[Bug target/25199] crashing code output from -mtune=pentium4 but not -mtune=pentiumpro

2008-08-28 Thread pinskia at gcc dot gnu dot org


--- Comment #15 from pinskia at gcc dot gnu dot org  2008-08-29 06:54 
---
I think this testcase is too strict in some cases.  With a modified compiler,
we get:
movb123(%eax), %dl
movl%edx, %esi
...
movb120(%eax), %al
movl%eax, %esi

Which is correct as far as I can tell, as we only say the lower half of %esi is
defined.  


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25199



Re: optimization bug gcc 4.1.2

2008-08-28 Thread Andrew Pinski
On Thu, Aug 28, 2008 at 11:27 PM, Fomin Eduard S. <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> inline double abs(double x)
> {
>// remove sign bit
>*reinterpret_cast(&x) &= 0x7FFFLL;
...
> This simple code works correct in DEBUG. But it works INCORRECT in
> release (-O2)

You are violating C/C++ aliasing rules, either use a memcpy, an union
or -fno-strict-aliasing.

Thanks,
Andrew Pinski


optimization bug gcc 4.1.2

2008-08-28 Thread Fomin Eduard S.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

inline double abs(double x)
{
// remove sign bit
*reinterpret_cast(&x) &= 0x7FFFLL;
return x;
}

int main(int argc, char *argv[])
{
std::cout << "abs = " << abs(-2.1) << std::endl;
}


This simple code works correct in DEBUG. But it works INCORRECT in
release (-O2)

gcc 4.1.2/4.1.1
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIt5bdzcPJMsK6QP8RAgvfAJ94tuXYQIGzBfktUi3dkQcXSsigzQCZAbAF
fxSsDpV4w7VoCv6Y06wSscs=
=1PBk
-END PGP SIGNATURE-


[Bug c++/37177] ICE on decltype(rel_ops::operator>);

2008-08-28 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2008-08-29 05:42 ---
Confirmed, we have the following TREE:
 
VOID
align 1 symtab 0 alias set -1 canonical type 0x434dcd20
pointer_to_this  reference_to_this
>

arg 0 

function 
VOID file t.cc line 3 col 30
align 1 context 
arguments 
value 

elt 0 >> result 
   >>
arg 1 >>

Which needs to be resolved still.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Keywords||ice-on-valid-code
   Last reconfirmed|-00-00 00:00:00 |2008-08-29 05:42:33
   date||
Summary|ICE on  |ICE on
   |decltype(rel_ops::operator><|decltype(rel_ops::operator><
   |int>);  |int>);


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37177



[Bug target/37137] [4.4 Regression] unrecognized command line option "-minterlink-mips16"

2008-08-28 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Keywords||build
Summary|unrecognized command line   |[4.4 Regression]
   |option "-minterlink-mips16" |unrecognized command line
   ||option "-minterlink-mips16"
   Target Milestone|--- |4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37137



[Bug target/37169] [4.4 Regression] Inefficent code for _mm_cvtsi64_si128

2008-08-28 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
   Target Milestone|--- |4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37169



[Bug target/37176] [arm] Optimizer omits loop condition leading to failing code

2008-08-28 Thread pinskia at gcc dot gnu dot org


--- Comment #3 from pinskia at gcc dot gnu dot org  2008-08-29 05:33 ---
Oh I see the issue, it is due to the way prefetch is defined.  It is defined
incorrectly.  The asm does basically:
char a = *(char*)possible_NULL_POINTER;
if (!possible_NULL_POINTER)
  break;

Now this is really valid for the compiler to assume (I never got this point to
Ian who did the fix for it).  Anyways GCC behavior was changed back with:
2008-07-23  Ian Lance Taylor  <[EMAIL PROTECTED]>

* tree-vrp.c (infer_value_range): Ignore asm statements when
looking for memory accesses for -fdelete-null-pointer-checks.

Anyways you should be using __builtin_prefetch instead.

Which was in 4.3.2.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.3.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37176



[Bug rtl-optimization/37273] [4.4 Regression] IRA does not re-materializes addresses (loads from the TOC)

2008-08-28 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2008-08-29 05:27 ---
This spilling also happens on x86-darwin.  Note x86-darwin uses -fPIC by
default.
For PPC it looks like IRA is not looking into REG_EQUAL:
We have in the dump right before IRA:
(insn:HI 29 26 30 2 gcc/gcc/testsuite/gcc.dg/20020103-1.c:38 (set (reg:DI 3 3)
(reg/f:DI 119)) 352 {*movdi_internal64} (expr_list:REG_DEAD (reg/f:DI
119)
(expr_list:REG_EQUAL (symbol_ref:DI ("ext") [flags 0xc0] )
(nil

So we had spilled reg 119 instead of the re-materialize the address from the
REG_EQUAL.

x86-darwin looks like a different issue though, but it looks like IRA is not
calling targetm.delegitimize_address to get the original address to
re-materialize it after the asm.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37273



[Bug rtl-optimization/37273] [4.4 Regression] IRA does not re-materializes addresses (loads from the TOC)

2008-08-28 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37273



[Bug target/37270] [4.4 Regression] SH: spill failure for R0_REGS

2008-08-28 Thread kkojima at gcc dot gnu dot org


--- Comment #2 from kkojima at gcc dot gnu dot org  2008-08-29 05:00 ---
(In reply to comment #1)

It starts to fail at some point between revision 139589 and 139690.
I guess that the IRA merge reveals the latent issue of the sh backend.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37270



[Bug rtl-optimization/37273] New: [4.4 Regression] IRA does not re-materializes addresses (loads from the TOC)

2008-08-28 Thread pinskia at gcc dot gnu dot org
As reported here http://gcc.gnu.org/ml/gcc-patches/2008-08/msg02071.html, we
now produce worse code for PPC64 Linux (and PPC AIX).
We produce now produce worse code for gcc.dg/20020103-1.c on powerpc64
with TOCs (and the stack space goes up, 256 vs 272).
Before IRA we emitted:
ld 3,[EMAIL PROTECTED](2)

but after we had spill the address to the stack which is wrose:
--- before.s2008-08-28 02:14:27.0 +0900
+++ after.s 2008-08-28 02:14:13.0 +0900
@@ -40,8 +40,9 @@ bar:
std 27,-40(1)
std 28,-32(1)
std 29,-24(1)
-   stdu 1,-256(1)
+   stdu 1,-272(1)
lwzu 5,4(31)
+   std 9,112(1)
lwa 4,0(30)
lwa 3,0(9)
extsw 5,5
@@ -52,12 +53,13 @@ bar:
#asm
  # 0 "" 2
 #NO_APP
+   ld 9,112(1)
mr 4,30
-   ld 3,[EMAIL PROTECTED](2)
mr 5,31
+   mr 3,9
bl f2
nop
-   addi 1,1,256
+   addi 1,1,272
ld 0,16(1)
ld 14,-144(1)
mtlr 0

Also if we are going to spill it to memory, then why use another
register and not just r3?

Note the comment on the testcase is incorrect:
/* Verify that constant equivalences get reloaded properly, either by being
   spilled to the stack, or regenerated, but not dropped to memory.  */

We do regnerate it so the check should not be done on lP64 Powerpc (or
any PowerOpen [TOC] based ABIs); I should mention that powerpc64 elf
has @got but xcoff does not have a @got which is why GCC uses the old
way of producing the TOC section.

Also note this testcase now passes on 32bit PPC Linux but that is only because
we spill the address instead of recreating it.

I bet this is a generic issue too and causes performance issues and stack usage
on more than just PowerPC 64.


-- 
   Summary: [4.4 Regression] IRA does not re-materializes addresses
(loads from the TOC)
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Keywords: missed-optimization, ra
  Severity: normal
  Priority: P3
 Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
GCC target triplet: powerpc64-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37273



[Bug c++/35852] -Wconversion rejects bitwise negation and assignment, cannot cast around

2008-08-28 Thread fang at csl dot cornell dot edu


--- Comment #7 from fang at csl dot cornell dot edu  2008-08-29 04:54 
---
(In reply to comment #5)
> This is the current situation as of revision 139373.
> 
> typedef unsigned short  ushort;
> 
> enum {
> FOO = 0x13
> };
> 
> template 
> inline
> void
> andnot(T& lv, const T& rv) {
>   lv &= ~rv; // -Wconversion  int(lv) & ~(int(rv))
> }
> 
> int
> main(int, char*[]) {
>   ushort x = 99;
>   x = ~FOO;   // -Wsign-conversion -20 -> unsigned short
>   x &= ~FOO;  // -Wconversion int(x) & ~(int(19)) -> unsigned 
> short
>   x = x & ~FOO;   // -Wconversion int(x) & ~(int(19)) -> unsigned 
> short
>   x = x & ushort(~FOO);   // no warning
>   x = x & ushort(~ushort(FOO));   // no warning
>   x &= static_cast(~FOO); // no warning
>   x &= ~x;// no warning
>   andnot(x, ushort(FOO)); // instantiated from here
>   return x;
> }
> 
> I don't see what is wrong with the warnings. Would you mind elaborating?

The situation then seems to have improved since I first reported it. 
Originally, none of the cases with explicit casts would pass, but comment #4
suggests that those have been fixed.  I expect the cast-less cases to have
warnings.  (I would consider this fixed.)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35852



[Bug rtl-optimization/37272] [4.4 Regression] IRA has caused ppc64-double-1.c to fail

2008-08-28 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37272



[Bug rtl-optimization/37272] New: [4.4 Regression] IRA has caused ppc64-double-1.c to fail

2008-08-28 Thread pinskia at gcc dot gnu dot org
As reported at http://gcc.gnu.org/ml/gcc-patches/2008-08/msg02068.html, IRA has
caused this testcase to fail and it causes a reload to happen.


-- 
   Summary: [4.4 Regression] IRA has caused ppc64-double-1.c to fail
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Keywords: missed-optimization, ra
  Severity: normal
  Priority: P3
 Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
GCC target triplet: powerpc64-*-*


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37272



[Bug target/37270] [4.4 Regression] SH: spill failure for R0_REGS

2008-08-28 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2008-08-29 04:45 ---
Do you know when this started to happen?  I almost want to say this is related
to IRA.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
   Keywords||ra
   Target Milestone|--- |4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37270



[Bug target/36539] [4.4 regression] IRA doesn't allocate asm output being returned to eax

2008-08-28 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
   Target Milestone|--- |4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36539



[Bug fortran/37193] [4.3/4.4 Regression] "USE mod, ONLY: i, i=>j" does not import "i"

2008-08-28 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
Summary|[4.3, 4.4 Regression] "USE  |[4.3/4.4 Regression] "USE
   |mod, ONLY: i, i=>j" does not|mod, ONLY: i, i=>j" does not
   |import "i"  |import "i"
   Target Milestone|--- |4.3.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37193



[Bug tree-optimization/36861] [4.3 Regression] boost's compressed avl confuses GCC

2008-08-28 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
   Target Milestone|--- |4.3.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36861



[Bug c++/37260] [4.1/4.2/4.3 Regression] infinite loop in init

2008-08-28 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
   Target Milestone|--- |4.2.5


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37260



[Bug rtl-optimization/37262] Two branches of the same condition being emitted

2008-08-28 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Severity|normal  |enhancement


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37262



[Bug tree-optimization/37242] missed FRE opportunity because of signedness of addition

2008-08-28 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Severity|normal  |enhancement


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37242



[Bug middle-end/37243] [4.4 Regression] IRA causes wrong code generation

2008-08-28 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-08-29 04:37:57
   date||
Summary|[4.4 Regression] Revision   |[4.4 Regression] IRA causes
   |139590 caused many  |wrong code generation
   |regressions |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37243



[Bug rtl-optimization/37263] [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64

2008-08-28 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2008-08-29 04:37 ---
We can optimize this by doing either of two things:
1) change iv-opts back to produce !=
2) a) have loop-iv.c keep /s/u for the subreg
 b) optimize (eq (subreg/s (reg)) (const_int 0) ) to (eq (reg) (const_int
0)).  

Both will fix the issue, I can test 2 as that is easy to implement and I
already have it done, I just need to test it fully.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-08-29 04:37:23
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37263



[Bug middle-end/37227] [4.4 Regression] gcc.dg/ipa/ipa-?.c

2008-08-28 Thread pinskia at gcc dot gnu dot org


--- Comment #5 from pinskia at gcc dot gnu dot org  2008-08-29 04:33 ---
Fixed by:
2008-08-27  Jan Hubicka  <[EMAIL PROTECTED]>

* gcc.dg/ipa/ipacost-1.c: Remove template matching only x86-64
* gcc.dg/ipa/ipacost-2.c: Add -fipa-cp-clone; remove template matching
only x86-64
* gcc.dg/ipa/ipa-1.c: Add -fipa-cp-clone
* gcc.dg/ipa/ipa-2.c: Add -fipa-cp-clone
* gcc.dg/ipa/ipa-3.c: Add -fipa-cp-clone
* gcc.dg/ipa/ipa-4.c: Add -fipa-cp-clone
* gcc.dg/ipa/ipa-5.c: Add -fipa-cp-clone
* gcc.dg/ipa/ipa-7.c: Add -fipa-cp-clone



-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37227



[Bug middle-end/37229] hang in lhd_print_error_function

2008-08-28 Thread pinskia at gcc dot gnu dot org


--- Comment #3 from pinskia at gcc dot gnu dot org  2008-08-29 04:31 ---


*** This bug has been marked as a duplicate of 36811 ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37229



[Bug middle-end/36811] [4.3/4.4 regression] endless (?) loop building with -O3

2008-08-28 Thread pinskia at gcc dot gnu dot org


--- Comment #7 from pinskia at gcc dot gnu dot org  2008-08-29 04:31 ---
*** Bug 37229 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pluto at agmk dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36811



[Bug target/37028] [4.4 Regression] Error compiling alpha.c in snapshot of 20080801

2008-08-28 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2008-08-29 04:29 ---
*** Bug 37138 has been marked as a duplicate of this bug. ***


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37028



[Bug c/37138] Errors compiling alpha.c in snapshot of 08/15/08

2008-08-28 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2008-08-29 04:29 ---
This is a dup.

*** This bug has been marked as a duplicate of 37028 ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37138



[Bug tree-optimization/37239] peeling last iteration of a <= loop

2008-08-28 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
   Severity|normal  |enhancement


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37239



[Bug middle-end/37233] 64-bit product of 32-bit value loses optimisation when inlined

2008-08-28 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2008-08-29 04:13 ---
This has been fixed on the trunk for 4.4:
L8:
movl40(%esp), %eax
mull(%ebp,%ecx,4)
movl%eax, 8(%esp)
addl%esi, 8(%esp)
movl%edx, 12(%esp)
movl8(%esp), %edx
adcl%edi, 12(%esp)
movl12(%esp), %edi
movl%edx, (%ebp,%ecx,4)
addl$1, %ecx
movl%edi, %esi
xorl%edi, %edi
cmpl%ecx, 36(%esp)
ja  L8

Note 4.3 produces the old bad code.

fwprop fixes this up from expansion time:
In insn 48, replacing
 (mult:SI (subreg:SI (reg:DI 96) 4)
(reg:SI 100 [ pretmp.43 ]))
 with (const_int 0 [0x0])
Changed insn 48
deferring rescan insn with uid = 48.

In insn 49, replacing
 (plus:SI (reg:SI 97)
(reg:SI 98))
 with (reg:SI 97)
Changed insn 49
deferring rescan insn with uid = 49.

Most likely due to:
2008-02-28  Richard Sandiford  <[EMAIL PROTECTED]>

* simplify-rtx.c (simplify_unary_operation_1): Extend the handling
of SUBREG_PROMOTED_VAR_P to cope with cases where the extended value
is smaller than the original promoted value.
(simplify_subreg): If OP is a SUBREG, try to preserve its
SUBREG_PROMOTED_VAR_P information.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
  Component|c   |middle-end
   Keywords||missed-optimization
 Resolution||FIXED
   Target Milestone|--- |4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37233



[Bug c++/36168] Incorrect (and strange) warnings with -Wuninitialized

2008-08-28 Thread manu at gcc dot gnu dot org


--- Comment #8 from manu at gcc dot gnu dot org  2008-08-29 03:51 ---
Things TODO here:

* Find out if we can get the "original form" of 'q.COLOUR8::r' to print
something closer to the original code.

* What is the difference in SSA after SRA when line 37214 is commented out?

* Perhaps we should never warn about things like this. Can we mark them as
artificial? If not, try setting and preserving TREE_NO_WARNING.

* Does this have to do with compiler-generated EH? If so, this is a duplicate
of another PR I have seen.

* The attached testcase is too big for the testsuite. We would need a smaller
one. Unfortunately, automatically reducing the testcase would probably lead to
a bogus one. So it must be done manually or find an alternative testcase.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36168



[Bug c++/37225] Incorrect intantiation context yields incorrect codegen

2008-08-28 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2008-08-29 03:47 ---
Yes this is a duplicate of PR 16635.

*** This bug has been marked as a duplicate of 16635 ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37225



[Bug c++/16635] g++ instantiates templates at the wrong place

2008-08-28 Thread pinskia at gcc dot gnu dot org


--- Comment #12 from pinskia at gcc dot gnu dot org  2008-08-29 03:47 
---
*** Bug 37225 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||gdr at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16635



[Bug testsuite/37202] FAIL: gcc.dg/visibility-1[4-9].c

2008-08-28 Thread pinskia at gcc dot gnu dot org


--- Comment #4 from pinskia at gcc dot gnu dot org  2008-08-29 03:46 ---
For darwin, the testcase should not be run as darwin does not require
private_extern for hidden extern functions.


As for avr, the issue is most likely not using elfos.h or defining
ASM_OUTPUT_EXTERNAL as default_elf_asm_output_external.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-08-29 03:46:01
   date||
   Target Milestone|4.4.0   |---


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37202



[Bug fortran/37199] array assignment from function writes out of bounds

2008-08-28 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Severity|blocker |normal


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37199



[Bug c++/35852] -Wconversion rejects bitwise negation and assignment, cannot cast around

2008-08-28 Thread manu at gcc dot gnu dot org


--- Comment #6 from manu at gcc dot gnu dot org  2008-08-29 03:38 ---
This is waiting for feedback.


-- 

manu at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35852



[Bug c++/35711] bad text in -Wcast-qual warning (forgets volatile)

2008-08-28 Thread manu at gcc dot gnu dot org


--- Comment #6 from manu at gcc dot gnu dot org  2008-08-29 03:37 ---
OK. Anyway, I am testing a patch for this already.


-- 

manu at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |manu at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|2008-03-27 14:14:41 |2008-08-29 03:37:35
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35711



[Bug c++/35711] bad text in -Wcast-qual warning (forgets volatile)

2008-08-28 Thread pinskia at gcc dot gnu dot org


--- Comment #5 from pinskia at gcc dot gnu dot org  2008-08-29 03:33 ---
(In reply to comment #4)
> Why such changes are not contributed back to FSF's GCC? I thought you would
> know better... :-(

It only happened in the last two months, it is on my list of things to
contribute back in the near future.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35711



[Bug c++/35711] bad text in -Wcast-qual warning (forgets volatile)

2008-08-28 Thread manu at gcc dot gnu dot org


--- Comment #4 from manu at gcc dot gnu dot org  2008-08-29 03:31 ---
(In reply to comment #3)
> (In reply to comment #2)
> >  It is almost  magic that we only warn for qualifiers.
>
> You can get the same message with an error message too:

Sorry, I meant that it is almost magic that we only given an error/warning when
casting away qualifiers and not for other invalid conversions since the only
thing that we really know at the point of giving the warning/error is that a
conversion was reject.

> As static_cast cannot cast away qualifiers.  Also note we (Sony) changed our
> GCC to just say qualifiers instead of constness.

Why such changes are not contributed back to FSF's GCC? I thought you would
know better... :-(


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35711



[Bug c++/35711] bad text in -Wcast-qual warning (forgets volatile)

2008-08-28 Thread pinskia at gcc dot gnu dot org


--- Comment #3 from pinskia at gcc dot gnu dot org  2008-08-29 03:08 ---
(In reply to comment #2)
>  It is almost  magic that we only warn for qualifiers.

You can get the same message with an error message too:
int* foo (volatile int *p)
{
return static_castp;
}

As static_cast cannot cast away qualifiers.  Also note we (Sony) changed our
GCC to just say qualifiers instead of constness.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35711



[Bug c++/35711] bad text in -Wcast-qual warning (forgets volatile)

2008-08-28 Thread manu at gcc dot gnu dot org


--- Comment #2 from manu at gcc dot gnu dot org  2008-08-29 01:56 ---
The obvious fix is to say "qualifiers" instead of constness. At the point of
warning we only know that the conversion is invalid but not why. It is almost
magic that we only warn for qualifiers.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35711



[Bug c/37271] gcc.dg/pr37186.c doesn't work

2008-08-28 Thread manu at gcc dot gnu dot org


--- Comment #2 from manu at gcc dot gnu dot org  2008-08-29 00:36 ---
Mine. The fix is trivial but I would test it nonetheless before committing.


-- 

manu at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |manu at gcc dot gnu dot org
   |dot org |
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-08-29 00:36:54
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37271



[Bug c/37271] gcc.dg/pr37186.c doesn't work

2008-08-28 Thread hjl dot tools at gmail dot com


--- Comment #1 from hjl dot tools at gmail dot com  2008-08-29 00:21 ---
Revision 139725 is OK and revision 139730 is bad. It may caused by
revision 139729.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37271



[Bug c/37271] New: gcc.dg/pr37186.c doesn't work

2008-08-28 Thread hjl dot tools at gmail dot com
Executing on host: /export/gnu/import/svn/gcc-test/bld/gcc/xgcc
-B/export/gnu/import/svn/gcc-test/bld/gcc/
/export/gnu/import/svn/gcc-test/src-trunk/gcc/testsuite/gcc.dg/pr37186.c  
-Wall -Werror -Wno-error=pointer-sign -S  -o pr37186.s(timeout = 300)
/export/gnu/import/svn/gcc-test/src-trunk/gcc/testsuite/gcc.dg/pr37186.c: In
function 'bar':^M
/export/gnu/import/svn/gcc-test/src-trunk/gcc/testsuite/gcc.dg/pr37186.c:8:
warning: pointer targets in passing argument 1 of 'foo' differ in signedness^M
/export/gnu/import/svn/gcc-test/src-trunk/gcc/testsuite/gcc.dg/pr37186.c:5:
note: expected 'signed char *' but argument is of type 'unsigned char *'^M
output is:
/export/gnu/import/svn/gcc-test/src-trunk/gcc/testsuite/gcc.dg/pr37186.c: In
function 'bar':^M
/export/gnu/import/svn/gcc-test/src-trunk/gcc/testsuite/gcc.dg/pr37186.c:8:
warning: pointer targets in passing argument 1 of 'foo' differ in signedness^M
/export/gnu/import/svn/gcc-test/src-trunk/gcc/testsuite/gcc.dg/pr37186.c:5:
note: expected 'signed char *' but argument is of type 'unsigned char *'^M

PASS: gcc.dg/pr37186.c  (test for warnings, line 8)
FAIL: gcc.dg/pr37186.c (test for excess errors)
Excess errors:
/export/gnu/import/svn/gcc-test/src-trunk/gcc/testsuite/gcc.dg/pr37186.c:5:
note: expected 'signed char *' but argument is of type 'unsigned char *'


-- 
   Summary: gcc.dg/pr37186.c doesn't work
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37271



[Bug c/18050] -Wsequence-point reports false positives

2008-08-28 Thread manu at gcc dot gnu dot org


--- Comment #15 from manu at gcc dot gnu dot org  2008-08-29 00:08 ---
Fixed in GCC 4.4

Thanks for the report.


-- 

manu at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18050



[Bug c/18050] -Wsequence-point reports false positives

2008-08-28 Thread manu at gcc dot gnu dot org


--- Comment #14 from manu at gcc dot gnu dot org  2008-08-29 00:07 ---
Subject: Bug 18050

Author: manu
Date: Fri Aug 29 00:06:19 2008
New Revision: 139742

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139742
Log:
2008-08-28  Manuel Lopez-Ibanez  <[EMAIL PROTECTED]>
Andrew Pinski  <[EMAIL PROTECTED]>

PR 18050
* c-common.c (verify_tree): Fix handling of ADDR_EXPR.
testsuite/
* gcc.dg/Wsequence-point-pr18050.c: New.
* g++.dg/warn/Wsequence-point-pr18050.C: New.

Added:
trunk/gcc/testsuite/g++.dg/warn/Wsequence-point-pr18050.C
trunk/gcc/testsuite/gcc.dg/Wsequence-point-pr18050.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-common.c
trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18050



[Bug c++/37260] [4.1 / 4.2 / 4.3 / 4.4 Regression] infinite loop in init

2008-08-28 Thread paolo at gcc dot gnu dot org


--- Comment #4 from paolo at gcc dot gnu dot org  2008-08-28 23:39 ---
Subject: Bug 37260

Author: paolo
Date: Thu Aug 28 23:37:41 2008
New Revision: 139740

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139740
Log:
/cp
2008-08-28  Paolo Carlini  <[EMAIL PROTECTED]>

PR c++/37260
* decl.c (reshape_init_r): Check init for error_mark_node.

/testsuite
2008-08-28  Paolo Carlini  <[EMAIL PROTECTED]>

PR c++/37260
* g++.dg/parse/crash44.C: New.


Added:
trunk/gcc/testsuite/g++.dg/parse/crash44.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37260



[Bug c++/37260] [4.1 / 4.2 / 4.3 Regression] infinite loop in init

2008-08-28 Thread paolo dot carlini at oracle dot com


--- Comment #5 from paolo dot carlini at oracle dot com  2008-08-28 23:39 
---
Fixed for 4.4.0.


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 AssignedTo|paolo dot carlini at oracle |unassigned at gcc dot gnu
   |dot com |dot org
 Status|ASSIGNED|NEW
  Known to fail|4.1.0 4.2.0 4.3.0 4.4.0 |4.1.0 4.2.0 4.3.0
Summary|[4.1 / 4.2 / 4.3 / 4.4  |[4.1 / 4.2 / 4.3 Regression]
   |Regression] infinite loop in|infinite loop in init
   |init|


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37260



[Bug c++/37268] ICE in template typedef with aligned attribute

2008-08-28 Thread paolo dot carlini at oracle dot com


--- Comment #2 from paolo dot carlini at oracle dot com  2008-08-28 23:35 
---
Really works everywhere now, 4.1.3 20080704 too.


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
  Known to work||4.1.3 4.2.4 4.3.1
 Resolution||WORKSFORME


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37268



[Bug target/37270] New: [4.4 Regression] SH: spill failure for R0_REGS

2008-08-28 Thread kkojima at gcc dot gnu dot org
The trunk compiler fails to compile libffi.call/cls_8byte.c
with -O2 -fomit-frame-pointer.  Here is a reduced test case:

typedef struct s8
{
  int a;
  float b;
} s8;

s8
s8_fn (struct s8 a1, struct s8 a2)
{
  struct s8 result;

  result.b = a1.b + a2.b;
  bar (a1.a, a1.b, a2.a, a2.b, result.a, result.b);
  return result;
}

With -O2 -fomit-frame-pointer, it causes

foo.c:15: error: unable to find a register to spill in class 'R0_REGS'
foo.c:15: error: this is the insn:
(insn:HI 23 44 45 3 foo.c:14 (parallel [
(set (subreg:SF (reg:SI 1 r1 [orig:174 D.1226+4 ] [174]) 0)
(reg:SF 163 [ D.1218 ]))
(use (reg/v:PSI 151 ))
(clobber (scratch:SI))
]) 205 {movsf_ie} (expr_list:REG_DEAD (reg:SF 163 [ D.1218 ])
(nil)))
foo.c:15: internal compiler error: in spill_failure, at reload1.c:2098


-- 
   Summary: [4.4 Regression] SH: spill failure for R0_REGS
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kkojima at gcc dot gnu dot org
GCC target triplet: sh4-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37270



[Bug middle-end/36444] [4.4 Regression] ICE in gen_lowpart_general with -O1 with vector registers

2008-08-28 Thread hjl dot tools at gmail dot com


--- Comment #7 from hjl dot tools at gmail dot com  2008-08-28 21:49 ---
*** Bug 37269 has been marked as a duplicate of this bug. ***


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36444



[Bug middle-end/37269] extract_bit_field_1 doesn't handle vector mode properly

2008-08-28 Thread hjl dot tools at gmail dot com


--- Comment #3 from hjl dot tools at gmail dot com  2008-08-28 21:49 ---


*** This bug has been marked as a duplicate of 36444 ***


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37269



[Bug middle-end/36444] [4.4 Regression] ICE in gen_lowpart_general with -O1 with vector registers

2008-08-28 Thread hjl dot tools at gmail dot com


--- Comment #6 from hjl dot tools at gmail dot com  2008-08-28 21:28 ---
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #1)
> > > Fix for at least PowerPC (we should be trying to get the correct sized 
> > > vector
> > > mode):
> > > Index: expmed.c
> > > ===
> > > --- expmed.c(revision 2510)
> > > +++ expmed.c(working copy)
> > > @@ -1129,7 +1129,7 @@ extract_bit_field (rtx str_rtx, unsigned
> > > new_mode = MIN_MODE_VECTOR_INT;
> > > 
> > >for (; new_mode != VOIDmode ; new_mode = GET_MODE_WIDER_MODE 
> > > (new_mode))
> > > -   if (GET_MODE_NUNITS (new_mode) == nunits
> > > +   if (GET_MODE_SIZE (new_mode) == GET_MODE_SIZE (new_mode)
> > 
> > I may have missed something. Is this always true?
> 
> Try replacing one of the new_mode with GET_MODE (op0) :).
> 

Both patches avoid ICE on my testcase. But my patch generates short code.
Can you try my patch on your testcase?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36444



[Bug middle-end/36444] [4.4 Regression] ICE in gen_lowpart_general with -O1 with vector registers

2008-08-28 Thread pinskia at gcc dot gnu dot org


--- Comment #5 from pinskia at gcc dot gnu dot org  2008-08-28 21:19 ---
(In reply to comment #4)
> (In reply to comment #1)
> > Fix for at least PowerPC (we should be trying to get the correct sized 
> > vector
> > mode):
> > Index: expmed.c
> > ===
> > --- expmed.c(revision 2510)
> > +++ expmed.c(working copy)
> > @@ -1129,7 +1129,7 @@ extract_bit_field (rtx str_rtx, unsigned
> > new_mode = MIN_MODE_VECTOR_INT;
> > 
> >for (; new_mode != VOIDmode ; new_mode = GET_MODE_WIDER_MODE 
> > (new_mode))
> > -   if (GET_MODE_NUNITS (new_mode) == nunits
> > +   if (GET_MODE_SIZE (new_mode) == GET_MODE_SIZE (new_mode)
> 
> I may have missed something. Is this always true?

Try replacing one of the new_mode with GET_MODE (op0) :).

-- Pinski


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36444



[Bug middle-end/37269] extract_bit_field_1 doesn't handle vector mode properly

2008-08-28 Thread hjl dot tools at gmail dot com


--- Comment #2 from hjl dot tools at gmail dot com  2008-08-28 21:13 ---
A patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2008-08/msg02197.html


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

URL||http://gcc.gnu.org/ml/gcc-
   ||patches/2008-
   ||08/msg02197.html


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37269



[Bug middle-end/36444] [4.4 Regression] ICE in gen_lowpart_general with -O1 with vector registers

2008-08-28 Thread hjl dot tools at gmail dot com


--- Comment #4 from hjl dot tools at gmail dot com  2008-08-28 21:14 ---
(In reply to comment #1)
> Fix for at least PowerPC (we should be trying to get the correct sized vector
> mode):
> Index: expmed.c
> ===
> --- expmed.c(revision 2510)
> +++ expmed.c(working copy)
> @@ -1129,7 +1129,7 @@ extract_bit_field (rtx str_rtx, unsigned
> new_mode = MIN_MODE_VECTOR_INT;
> 
>for (; new_mode != VOIDmode ; new_mode = GET_MODE_WIDER_MODE 
> (new_mode))
> -   if (GET_MODE_NUNITS (new_mode) == nunits
> +   if (GET_MODE_SIZE (new_mode) == GET_MODE_SIZE (new_mode)

I may have missed something. Is this always true?

> && GET_MODE_INNER (new_mode) == tmode
> && targetm.vector_mode_supported_p (new_mode))
>   break;
> 


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

 CC||hjl dot tools at gmail dot
   ||com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36444



[Bug middle-end/37170] [4.4 Regression]: gcc.dg/weak/weak-1.c

2008-08-28 Thread eric dot weddington at atmel dot com


--- Comment #60 from eric dot weddington at atmel dot com  2008-08-28 21:05 
---
(In reply to comment #59)
> Patch at .
> 

Patch still works on AVR.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37170



[Bug middle-end/37269] extract_bit_field_1 doesn't handle vector mode properly

2008-08-28 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2008-08-28 21:03 ---
What happens if you try the patch in PR 36444 comment #1.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37269



[Bug middle-end/37269] New: extract_bit_field_1 doesn't handle vector mode properly

2008-08-28 Thread hjl dot tools at gmail dot com
[EMAIL PROTECTED] vararg-2]$ cat x.i
__attribute__ ((vector_size (8))) signed char v4, v5, v6;
void
two (void)
{
  v4 = v5 + v6;
}
[EMAIL PROTECTED] vararg-2]$ make x.s
/export/build/gnu/gcc-work/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc-work/build-x86_64-linux/gcc/ -mavx -m32 -S x.i
x.i: In function ‘two’:
x.i:6: internal compiler error: in gen_lowpart_general, at rtlhooks.c:51
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [x.s] Error 1
[EMAIL PROTECTED] vararg-2]$ 
Starting program: /export/build/gnu/gcc-work/build-x86_64-linux/gcc/cc1
-fpreprocessed x.i -quiet -dumpbase x.i -mavx -m32 -mtune=generic -auxbase x
-version -o x.s
GNU C (GCC) version 4.4.0 20080828 (experimental) [trunk revision 139730]
(x86_64-unknown-linux-gnu)
compiled by GNU C version 4.3.0 20080428 (Red Hat 4.3.0-8), GMP version
4.2.2, MPFR version 2.3.1.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 86b79a008cee0f5fea850c16d9990a89

Breakpoint 1, fancy_abort (
file=0xf56328 "/export/gnu/src/gcc-work/gcc/gcc/rtlhooks.c", line=51, 
function=0xf56310 "gen_lowpart_general")
at /export/gnu/src/gcc-work/gcc/gcc/diagnostic.c:699
699   internal_error ("in %s, at %s:%d", function, trim_filename (file),
line);
(gdb) f 2
#2  0x005e3e1f in extract_bit_field_1 (str_rtx=0x73286140, 
bitsize=32, bitnum=0, unsignedp=1, target=0x732860e0, mode=SImode, 
tmode=SImode, fallback_p=1 '\001')
at /export/gnu/src/gcc-work/gcc/gcc/expmed.c:1205
1205op0 = gen_lowpart (new_mode, op0);
(gdb) call debug_rtx (str_rtx)
(reg:V8QI 78 [ v5.0 ])
(gdb) p new_mode
$1 = V8SImode
(gdb) call debug_rtx (op0)
(reg:V8QI 78 [ v5.0 ])
(gdb) 

AVX happens to have V8SImode. But there is no subreg of V8SImode
from V8QImode.


-- 
   Summary: extract_bit_field_1 doesn't handle vector mode properly
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37269



[Bug c++/37268] ICE in template typedef with aligned attribute

2008-08-28 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2008-08-28 20:42 ---
This works on the trunk and in 4.3.0.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37268



[Bug c++/37268] New: ICE in template typedef with aligned attribute

2008-08-28 Thread svobodamo at gmail dot com
gcc:
g++-4.1 (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

system:
Linux mavis 2.6.18-6-xen-amd64 #1 SMP Fri Jun 6 06:38:05 UTC 2008 x86_64
GNU/Linux

cmd line:
g++-4.1 -v -Wall -ggdb -save-temps test.cpp

output:
[EMAIL PROTECTED]:~/devel/g++4.1-crash$ g++-4.1 -v -Wall -ggdb -save-temps 
test.cpp
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --enable-checking=release
x86_64-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
 /usr/lib/gcc/x86_64-linux-gnu/4.1.2/cc1plus -E -quiet -v -D_GNU_SOURCE \
test.cpp -mtune=k8 -Wall -fworking-directory -fpch-preprocess -o
test.ii
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../x86_64-linux-gnu/include"
ignoring nonexistent directory "/usr/include/x86_64-linux-gnu"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../include/c++/4.1.2

/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../include/c++/4.1.2/x86_64-linux-gnu
 /usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../include/c++/4.1.2/backward
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/4.1.2/include
 /usr/include
End of search list.
 /usr/lib/gcc/x86_64-linux-gnu/4.1.2/cc1plus -fpreprocessed test.ii -quiet 
\
-dumpbase test.cpp -mtune=k8 -auxbase test -ggdb -Wall -version -o
test.s

GNU C++ version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
(x86_64-linux-gnu)
compiled by GNU C version 4.1.2 20061115 (prerelease) (Debian
4.1.1-21).
GGC heuristics: --param ggc-min-expand=93 --param ggc-min-heapsize=119424
Compiler executable checksum: 632603bce5ef3f84603416b58939d0f7
test.cpp: In instantiation of ‘C’:
test.cpp:21:   instantiated from here
test.cpp:12: internal compiler error: in is_base_type, at dwarf2out.c:8236
Please submit a full bug report,


preprocessed file:

// /usr/lib/gcc/x86_64-linux-gnu/4.1.2/cc1plus -fpreprocessed test.ii -quiet
// -dumpbase test.cpp -mtune=k8 -auxbase test -ggdb -Wall -version -o -
// -frandom-seed=0

# 1 "test.cpp"
# 1 "/home/x/devel/g++4.1-crash//"
# 1 ""
# 1 ""
# 1 "test.cpp"
struct A { };
struct AA { };

template
struct B {
typedef A T_A;
};


template
struct C {
typedef typename B::T_A __attribute__((aligned(16))) T2;

C () { }
};


int main (int , char* [])
{   
C q;
return 0;
}


-- 
   Summary: ICE in template typedef with aligned attribute
   Product: gcc
   Version: 4.1.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: svobodamo at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37268



[Bug c/30949] "incompatible pointer type" warning does not point to declaration

2008-08-28 Thread manu at gcc dot gnu dot org


--- Comment #3 from manu at gcc dot gnu dot org  2008-08-28 19:57 ---
The issue reported is fixed. Thanks for the report.

I am going to include in this bug also the "incompatible types" errors that are
given in the same function, so not marking as fixed yet.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30949



[Bug c/30949] "incompatible pointer type" warning does not point to declaration

2008-08-28 Thread manu at gcc dot gnu dot org


--- Comment #2 from manu at gcc dot gnu dot org  2008-08-28 19:35 ---
Subject: Bug 30949

Author: manu
Date: Thu Aug 28 19:34:36 2008
New Revision: 139729

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139729
Log:
2008-08-28  Manuel Lopez-Ibanez  <[EMAIL PROTECTED]>

PR c/30949
* c-typeck.c (convert_for_assignment): Give a note describing what
was passed and what was expected.
testsuite/
* gcc.dg/pr30949.c: New.
* gcc.dg/transparent-union-1.c: Update.
* gcc.dg/cleanup-1.c: Update.
* gcc.dg/assign-warn-2.c: Update.
* gcc.dg/conv-2.c: Update.
* gcc.dg/Wpointer-sign-pedantic.c: Update.
* gcc.dg/Wpointer-sign-Wall.c: Update.
* gcc.dg/assign-warn-1.c: Update.
* gcc.dg/dfp/composite-type.c: Update.
* gcc.dg/noncompile/20020213-1.c: Update.

Added:
trunk/gcc/testsuite/gcc.dg/pr30949.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-typeck.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/Wpointer-sign-Wall.c
trunk/gcc/testsuite/gcc.dg/Wpointer-sign-pedantic.c
trunk/gcc/testsuite/gcc.dg/assign-warn-1.c
trunk/gcc/testsuite/gcc.dg/assign-warn-2.c
trunk/gcc/testsuite/gcc.dg/cleanup-1.c
trunk/gcc/testsuite/gcc.dg/conv-2.c
trunk/gcc/testsuite/gcc.dg/dfp/composite-type.c
trunk/gcc/testsuite/gcc.dg/noncompile/20020213-1.c
trunk/gcc/testsuite/gcc.dg/transparent-union-1.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30949



[Bug c/37267] New: #pragma inside structure initialization causes error

2008-08-28 Thread neale at sinenomine dot net
We’ve implemented the #pragma ident which simply generates information in the
comment section of an elf object. Solaris uses it throughout its source tree.
However, it’s causing some grief when used in a manner like this:

#include 

typedef struct X {
int a;
int b;
} X_t;

int z;

X_t x[] = {
#pragma weak Y = z
{0,1},
{2,3}
};

int 
main(int argc, char **argv) 
{
printf("%x",x[0].a);
return x[1].b;
}


I’ve replaced ident with weak so it will run on other platforms. For gcc 4.0.1
there’s no problem but with 4.2.3 I get the following:

/tmp/test.c:11: error: expected expression before '#pragma'

The context in which I am seeing a problem is that the C code does something
like this:

tuple_t x[] = {
#include “a.h”
#include “b.h”
};

Each of the ‘.h’ files have the contents of the structure but they also contain
a #pragma ident which causes the compiler to emit the error.

Neale


-- 
   Summary: #pragma inside structure initialization causes error
   Product: gcc
   Version: 4.2.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: neale at sinenomine dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37267



[Bug middle-end/37248] [4.3/4.4 Regression] regression 4.3.1 -> 4.3.2-rc transformation bitfield to individual bytes

2008-08-28 Thread jakub at gcc dot gnu dot org


--- Comment #3 from jakub at gcc dot gnu dot org  2008-08-28 16:29 ---
Well, on the 4.3 branch it has been removed just because it has been removed on
the trunk and happened to make one PR away.  See PR36449 for an alternative fix
that doesn't disable the optimization.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37248



[Bug c++/37260] [4.1 / 4.2 / 4.3 / 4.4 Regression] infinite loop in init

2008-08-28 Thread paolo dot carlini at oracle dot com


--- Comment #3 from paolo dot carlini at oracle dot com  2008-08-28 16:09 
---
Doesn't reproduce with 4.0.4:

37260.C: In function ‘int main()’:
37260.C:8: error: ‘PTHREAD_ONCE_INITIALIZER’ was not declared in this scope
37260.C:9: error: initializer for ‘pthread_once_t’ must be brace-enclosed


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

  Known to fail|4.3.0 4.4.0 |4.1.0 4.2.0 4.3.0 4.4.0
  Known to work||4.0.4
Summary|infinite loop in init   |[4.1 / 4.2 / 4.3 / 4.4
   ||Regression] infinite loop in
   ||init


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37260



[Bug rtl-optimization/17088] [4.4 Regression] poor fortran optimisation at -O2/3

2008-08-28 Thread jv244 at cam dot ac dot uk


--- Comment #16 from jv244 at cam dot ac dot uk  2008-08-28 16:08 ---
actually, I've been misreading the numbers... the timings for the library
function   (MATMUL) is bad, not the generated code, which is reasonable also
with gfortran. I'll close the bug.


-- 

jv244 at cam dot ac dot uk changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17088



[Bug rtl-optimization/17088] [4.4 Regression] poor fortran optimisation at -O2/3

2008-08-28 Thread jv244 at cam dot ac dot uk


--- Comment #15 from jv244 at cam dot ac dot uk  2008-08-28 15:56 ---
Created an attachment (id=16158)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16158&action=view)
ifort asm

ifort asm as a reference


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17088



[Bug rtl-optimization/17088] [4.4 Regression] poor fortran optimisation at -O2/3

2008-08-28 Thread jv244 at cam dot ac dot uk


--- Comment #14 from jv244 at cam dot ac dot uk  2008-08-28 15:55 ---
It looks like 4.4 performs even worse than 4.3 on the attached testcase.

gfortran -ffast-math -march=native -O3 PR17088.f90
trunk: 0.528032997
4.3.0: 0.492029997

ifort -xhost -O2 PR17088.f90
ifort: 0.1360080

so trunk is somehow 4 times slower than ifort...


-- 

jv244 at cam dot ac dot uk changed:

   What|Removed |Added

Summary|poor fortran optimisation at|[4.4 Regression] poor
   |-O2/3   |fortran optimisation at -
   ||O2/3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17088



[Bug classpath/32028] Make fails at gjdoc - gnu.classpath.tools.gjdoc.ParseException: unmatched input in line 1: @Retention(SOURCE) @Target(METHOD)

2008-08-28 Thread gnu_andrew at member dot fsf dot org


--- Comment #13 from gnu_andrew at member dot fsf dot org  2008-08-28 15:40 
---
Closing as fixed.


-- 

gnu_andrew at member dot fsf dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32028



[Bug tree-optimization/31029] missed optimization

2008-08-28 Thread jv244 at cam dot ac dot uk


--- Comment #5 from jv244 at cam dot ac dot uk  2008-08-28 15:40 ---
current trunk still doesn't remove the if statement, despite the fact that it
could.


-- 

jv244 at cam dot ac dot uk changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Keywords||missed-optimization
  Known to fail||4.3.0 4.4.0
   Last reconfirmed|-00-00 00:00:00 |2008-08-28 15:40:02
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31029



[Bug c++/36741] [4.3/4.4 regression] Bogus "large integer implicitly truncated" passing size_t constant to new

2008-08-28 Thread dodji at gcc dot gnu dot org


--- Comment #18 from dodji at gcc dot gnu dot org  2008-08-28 15:29 ---
Fixed in trunk and gcc-4_3-branch.


-- 

dodji at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36741



[Bug tree-optimization/37207] [4.4 Regression] ice at tree-ssa-ifcombine.c:222 for -Os

2008-08-28 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2008-08-28 15:27 ---
Subject: Bug 37207

Author: rguenth
Date: Thu Aug 28 15:26:13 2008
New Revision: 139714

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139714
Log:
2008-08-28  Richard Guenther  <[EMAIL PROTECTED]>

PR tree-optimization/37207
* tree-ssa-ifcombine.c (recognize_single_bit_test): Fix
tuplification bug.

* gcc.c-torture/compile/pr37207.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr37207.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-ifcombine.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37207



[Bug tree-optimization/37207] [4.4 Regression] ice at tree-ssa-ifcombine.c:222 for -Os

2008-08-28 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2008-08-28 15:18 ---
Mine.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2008-08-24 22:40:19 |2008-08-28 15:18:07
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37207



[Bug fortran/37253] Segmentation fault with procedure pointer

2008-08-28 Thread janus at gcc dot gnu dot org


--- Comment #6 from janus at gcc dot gnu dot org  2008-08-28 15:13 ---
Fixed in r139713. Closing.


-- 

janus at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37253



[Bug fortran/37253] Segmentation fault with procedure pointer

2008-08-28 Thread janus at gcc dot gnu dot org


--- Comment #5 from janus at gcc dot gnu dot org  2008-08-28 15:12 ---
Subject: Bug 37253

Author: janus
Date: Thu Aug 28 15:10:50 2008
New Revision: 139713

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139713
Log:
2008-08-28  Janus Weil  <[EMAIL PROTECTED]>

PR fortran/37253
* module.c (ab_attribute,attr_bits,mio_symbol_attribute): Take care of
saving attr.procedure and attr.proc_ptr to the module file.


2008-08-28  Janus Weil  <[EMAIL PROTECTED]>

PR fortran/37253
* gfortran.dg/proc_ptr_10.f90: New.

Added:
trunk/gcc/testsuite/gfortran.dg/proc_ptr_10.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/module.c
trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37253



[Bug tree-optimization/36630] [4.3/4.4 Regression] ICE in vect_update_ivs_after_vectorizer

2008-08-28 Thread rguenth at gcc dot gnu dot org


--- Comment #7 from rguenth at gcc dot gnu dot org  2008-08-28 15:09 ---
I still think that handling NULL from evolution_part_in_loop_num is the
correct thing to do.  Even if you need to move this check to the analysis
phase.

The interesting thing is that the access function during
vect_analyze_scalar_cycles_1 is

{2, +, 1}_1

which is because after the vectorized part of the loop the prologue
remains which has a non-constant evolution start.

So with the reasoning that you analyzed the access function of the
original loop properly you can probably strip the conversion that
confuses you at just vect_update_ivs_after_vectorizer.  (Or store
the relevant information during analysis where the evolution is
still simple enough)

This would fix the ICE, but I wonder if it may cause wrong code because
of mismatched types somehow. 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36630



[Bug c++/36741] [4.3/4.4 regression] Bogus "large integer implicitly truncated" passing size_t constant to new

2008-08-28 Thread lopezibanez at gmail dot com


--- Comment #17 from lopezibanez at gmail dot com  2008-08-28 14:56 ---
Subject: Re:  [4.3/4.4 regression] Bogus "large integer implicitly truncated"
passing size_t constant to new

2008/8/28 dodji at gcc dot gnu dot org <[EMAIL PROTECTED]>:
> Log:
> 2008-08-28  Dodji Seketeli  <[EMAIL PROTECTED]>
>
>PR c++/36741
>* tree.c (int_fits_type_p): Don't forget unsigned integers
>  of type sizetype which higher end word equals -1.
>
>
> Added:
>trunk/gcc/testsuite/g++.dg/other/new-size-type.C

You forgot to mention this file in the commit log. Please rectify the log.

Thanks

Manuel.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36741



[Bug c++/36741] [4.3/4.4 regression] Bogus "large integer implicitly truncated" passing size_t constant to new

2008-08-28 Thread dodji at gcc dot gnu dot org


--- Comment #16 from dodji at gcc dot gnu dot org  2008-08-28 14:51 ---
Subject: Bug 36741

Author: dodji
Date: Thu Aug 28 14:49:48 2008
New Revision: 139712

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139712
Log:
2008-08-28  Dodji Seketeli  <[EMAIL PROTECTED]>

PR c++/36741
* tree.c (int_fits_type_p): Don't forget unsigned integers
  of type sizetype which higher end word equals -1.


Added:
trunk/gcc/testsuite/g++.dg/other/new-size-type.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36741



[Bug c++/36741] [4.3/4.4 regression] Bogus "large integer implicitly truncated" passing size_t constant to new

2008-08-28 Thread dodji at gcc dot gnu dot org


--- Comment #15 from dodji at gcc dot gnu dot org  2008-08-28 14:50 ---
Subject: Bug 36741

Author: dodji
Date: Thu Aug 28 14:49:25 2008
New Revision: 139711

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139711
Log:
2008-08-28  Dodji Seketeli  <[EMAIL PROTECTED]>

PR c++/36741
* tree.c (int_fits_type_p): Don't forget unsigned integers
  of type sizetype which higher end word equals -1.


Added:
branches/gcc-4_3-branch/gcc/testsuite/g++.dg/other/new-size-type.C
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
branches/gcc-4_3-branch/gcc/tree.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36741



[Bug tree-optimization/37102] [4.3/4.4 Regression] possible integer codegen bug

2008-08-28 Thread rguenth at gcc dot gnu dot org


--- Comment #6 from rguenth at gcc dot gnu dot org  2008-08-28 14:48 ---
It looks like that we correctly track liveliness by

Live on entry to BB2 :

Live on entry to BB3 : a_lsm.27_5

Live on entry to BB4 : a_lsm.27_5

Live on entry to BB5 :

Live on entry to BB6 :

for

  # BLOCK 2 freq:2000
  # PRED: ENTRY [100.0%]  (fallthru,exec)
  c.0_4 = c;
  a_lsm.27_5 = b;
  a_lsm.27_1 = a;
  if (c.0_4 != 0)
goto ;
  else
goto ;
  # SUCC: 4 [50.0%]  (false,exec) 3 [50.0%]  (true,exec)

  # BLOCK 3 freq:1000
  # PRED: 2 [50.0%]  (true,exec)
  # SUCC: 4 [100.0%]  (fallthru,exec)

  # BLOCK 4 freq:2000
  # PRED: 3 [100.0%]  (fallthru,exec) 2 [50.0%]  (false,exec)
  # a_lsm.27_29 = PHI 
  a = a_lsm.27_5;
  e_9 = a_lsm.27_5 << 1;
  if (e_9 != 0)
goto ;
  else
goto ;
  # SUCC: 5 [54.0%]  (true,exec) 6 [46.0%]  (false,exec)


and based on this create the conflict graph.  But we still (blindly)
generate copies for the (dead) PHI node in BB4 which causes conflicts
that we didn't see.

So, why exactly do we generate copies for a PHI node which result is
not live-in in its BB?  Andrew - you are probably most familiar with
the out-of-SSA code, can you have a look here?  (the dead PHI node is
caused by the last DSE pass which removes the last use of it and there
is no other DCE pass to clean that up).

Jakubs testcase from comment #3 at -O3.

My humble "fix" for this would be to exchange 118.cddce with 120.dse which
should hide this problem.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||amacleod at redhat dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37102



[Bug target/37101] [4.2 Regression] wrong code: tree vectorizer omits bogus movq/movlps construct

2008-08-28 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

  Known to fail||4.2.4 4.3.1
  Known to work||4.3.2 4.4.0
   Target Milestone|4.3.3   |4.2.5


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37101



[Bug middle-end/36548] [4.3 Regression] remainder gives the wrong result for wrapping case with unsigned types

2008-08-28 Thread rguenth at gcc dot gnu dot org


--- Comment #10 from rguenth at gcc dot gnu dot org  2008-08-28 14:19 
---
Subject: Bug 36548

Author: rguenth
Date: Thu Aug 28 14:18:23 2008
New Revision: 139709

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139709
Log:
2008-08-28  Richard Guenther  <[EMAIL PROTECTED]>

PR middle-end/36548
PR middle-end/37125
* fold-const.c (extract_muldiv_1): Optimize (X * C1) % C2 only
if the multiplication does not overflow.

* gcc.c-torture/execute/pr37125.c: New testcase.

Added:
branches/gcc-4_3-branch/gcc/testsuite/gcc.c-torture/execute/pr37125.c
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/fold-const.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36548



[Bug middle-end/37125] [4.3/4.4 Regression] possible integer codegen bug

2008-08-28 Thread rguenth at gcc dot gnu dot org


--- Comment #9 from rguenth at gcc dot gnu dot org  2008-08-28 14:19 ---
Subject: Bug 37125

Author: rguenth
Date: Thu Aug 28 14:18:23 2008
New Revision: 139709

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139709
Log:
2008-08-28  Richard Guenther  <[EMAIL PROTECTED]>

PR middle-end/36548
PR middle-end/37125
* fold-const.c (extract_muldiv_1): Optimize (X * C1) % C2 only
if the multiplication does not overflow.

* gcc.c-torture/execute/pr37125.c: New testcase.

Added:
branches/gcc-4_3-branch/gcc/testsuite/gcc.c-torture/execute/pr37125.c
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/fold-const.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37125



[Bug middle-end/36548] [4.3 Regression] remainder gives the wrong result for wrapping case with unsigned types

2008-08-28 Thread rguenth at gcc dot gnu dot org


--- Comment #9 from rguenth at gcc dot gnu dot org  2008-08-28 14:18 ---
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work|4.4.0   |4.3.3 4.4.0
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36548



[Bug middle-end/36817] [4.3 Regression] internal compiler error: in compare_values_warnv

2008-08-28 Thread rguenth at gcc dot gnu dot org


--- Comment #15 from rguenth at gcc dot gnu dot org  2008-08-28 14:17 
---
Subject: Bug 36817

Author: rguenth
Date: Thu Aug 28 14:15:49 2008
New Revision: 139708

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139708
Log:
2008-08-28  Richard Guenther  <[EMAIL PROTECTED]>

PR middle-end/36817
* tree-chrec.c (chrec_apply): Always call chrec_fold_plus which
makes sure to produce a result of the correct type.

* gcc.c-torture/compile/pr36817.c: New testcase.

Added:
branches/gcc-4_3-branch/gcc/testsuite/gcc.c-torture/compile/pr36817.c
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
branches/gcc-4_3-branch/gcc/tree-chrec.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36817



[Bug middle-end/36817] [4.3 Regression] internal compiler error: in compare_values_warnv

2008-08-28 Thread rguenth at gcc dot gnu dot org


--- Comment #14 from rguenth at gcc dot gnu dot org  2008-08-28 14:16 
---
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to fail|4.3.0 4.3.1 |4.3.0 4.3.1 4.3.2
  Known to work|4.2.4 4.4.0 |4.2.4 4.3.3 4.4.0
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36817



[Bug target/37184] [4.3 Regression] ice in ix86_match_ccmode

2008-08-28 Thread ubizjak at gmail dot com


--- Comment #6 from ubizjak at gmail dot com  2008-08-28 13:47 ---
Fixed.


-- 

ubizjak at gmail dot com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37184



[Bug target/37197] -msse4 ICE on __builtin_parityl

2008-08-28 Thread ubizjak at gmail dot com


--- Comment #5 from ubizjak at gmail dot com  2008-08-28 13:46 ---
Fixed.


-- 

ubizjak at gmail dot com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37197



[Bug target/37191] [4.3 Regression] ICE in inline_secondary_memory_needed, at config/i386/i386.c:21849

2008-08-28 Thread ubizjak at gmail dot com


--- Comment #7 from ubizjak at gmail dot com  2008-08-28 13:46 ---
Fixed.


-- 

ubizjak at gmail dot com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37191



[Bug c/37266] New: extra #pragma weak breaks function aliasing

2008-08-28 Thread Petr dot Salinger at seznam dot cz
The extra line "#pragma weak __foo" breaks function aliasing.

For the code bellow, the compiler emits warning "asm declaration ignored due to
conflict with previous rename", in fact it really ignores asm declaration.
Without "#pragma weak __foo", fce() calls __bar(), when it is included
it tries to call bar().


#pragma weak __foo
extern int bar (void);
extern int bar (void) __asm__ ("__bar");

int fce()
{
  bar();
}


-- 
   Summary: extra #pragma weak breaks function aliasing
   Product: gcc
   Version: 4.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Petr dot Salinger at seznam dot cz
  GCC host triplet: i486-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37266



[Bug target/37184] [4.3 Regression] ice in ix86_match_ccmode

2008-08-28 Thread uros at gcc dot gnu dot org


--- Comment #5 from uros at gcc dot gnu dot org  2008-08-28 13:32 ---
Subject: Bug 37184

Author: uros
Date: Thu Aug 28 13:31:33 2008
New Revision: 139707

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139707
Log:
PR target/37184
* config/i386/i386.c (ix86_match_ccmode): Handle CCAmode,
CCCmode, CCOmode and CCSmode destination modes.

PR target/37191
* config/i386/mmx.md (*vec_extractv2sf_0): Avoid combining registers
from different units in a single alternative.
(*vec_extractv2sf_1): Ditto.
(*vec_extractv2si_0): Ditto.
(*vec_extractv2si_1): Ditto.
* config/i386/sse.md (sse2_storehpd): Ditto.
(sse2_storelpd): Ditto.
(sse2_loadhpd): Ditto.
(sse2_loadlpd): Ditto.

PR target/37197
* config/i386/i386.md (clzsi2_abm): Fix operand 1 constraints.
(popcountsi2): Ditto.
(clzdi2_abm): Ditto.
(popcountdi2): Ditto.
(clzhi2_abm): Ditto.
(popcounthi2): Ditto.

testsuite/ChangeLog:

PR target/37184
* gcc.target/i386/pr37184.c: New test.

PR target/37191
* gcc.target/i386/pr37191.c: New test.

PR target/37197
* gcc.target/i386/pr37197.c: New test.


Added:
branches/gcc-4_3-branch/gcc/testsuite/gcc.target/i386/pr37184.c
  - copied unchanged from r139471,
trunk/gcc/testsuite/gcc.target/i386/pr37184.c
branches/gcc-4_3-branch/gcc/testsuite/gcc.target/i386/pr37191.c
  - copied unchanged from r139471,
trunk/gcc/testsuite/gcc.target/i386/pr37191.c
branches/gcc-4_3-branch/gcc/testsuite/gcc.target/i386/pr37197.c
  - copied unchanged from r139471,
trunk/gcc/testsuite/gcc.target/i386/pr37197.c
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/config/i386/i386.c
branches/gcc-4_3-branch/gcc/config/i386/i386.md
branches/gcc-4_3-branch/gcc/config/i386/mmx.md
branches/gcc-4_3-branch/gcc/config/i386/sse.md
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37184



[Bug target/37197] -msse4 ICE on __builtin_parityl

2008-08-28 Thread uros at gcc dot gnu dot org


--- Comment #4 from uros at gcc dot gnu dot org  2008-08-28 13:32 ---
Subject: Bug 37197

Author: uros
Date: Thu Aug 28 13:31:33 2008
New Revision: 139707

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139707
Log:
PR target/37184
* config/i386/i386.c (ix86_match_ccmode): Handle CCAmode,
CCCmode, CCOmode and CCSmode destination modes.

PR target/37191
* config/i386/mmx.md (*vec_extractv2sf_0): Avoid combining registers
from different units in a single alternative.
(*vec_extractv2sf_1): Ditto.
(*vec_extractv2si_0): Ditto.
(*vec_extractv2si_1): Ditto.
* config/i386/sse.md (sse2_storehpd): Ditto.
(sse2_storelpd): Ditto.
(sse2_loadhpd): Ditto.
(sse2_loadlpd): Ditto.

PR target/37197
* config/i386/i386.md (clzsi2_abm): Fix operand 1 constraints.
(popcountsi2): Ditto.
(clzdi2_abm): Ditto.
(popcountdi2): Ditto.
(clzhi2_abm): Ditto.
(popcounthi2): Ditto.

testsuite/ChangeLog:

PR target/37184
* gcc.target/i386/pr37184.c: New test.

PR target/37191
* gcc.target/i386/pr37191.c: New test.

PR target/37197
* gcc.target/i386/pr37197.c: New test.


Added:
branches/gcc-4_3-branch/gcc/testsuite/gcc.target/i386/pr37184.c
  - copied unchanged from r139471,
trunk/gcc/testsuite/gcc.target/i386/pr37184.c
branches/gcc-4_3-branch/gcc/testsuite/gcc.target/i386/pr37191.c
  - copied unchanged from r139471,
trunk/gcc/testsuite/gcc.target/i386/pr37191.c
branches/gcc-4_3-branch/gcc/testsuite/gcc.target/i386/pr37197.c
  - copied unchanged from r139471,
trunk/gcc/testsuite/gcc.target/i386/pr37197.c
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/config/i386/i386.c
branches/gcc-4_3-branch/gcc/config/i386/i386.md
branches/gcc-4_3-branch/gcc/config/i386/mmx.md
branches/gcc-4_3-branch/gcc/config/i386/sse.md
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37197



[Bug target/37191] [4.3 Regression] ICE in inline_secondary_memory_needed, at config/i386/i386.c:21849

2008-08-28 Thread uros at gcc dot gnu dot org


--- Comment #6 from uros at gcc dot gnu dot org  2008-08-28 13:32 ---
Subject: Bug 37191

Author: uros
Date: Thu Aug 28 13:31:33 2008
New Revision: 139707

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139707
Log:
PR target/37184
* config/i386/i386.c (ix86_match_ccmode): Handle CCAmode,
CCCmode, CCOmode and CCSmode destination modes.

PR target/37191
* config/i386/mmx.md (*vec_extractv2sf_0): Avoid combining registers
from different units in a single alternative.
(*vec_extractv2sf_1): Ditto.
(*vec_extractv2si_0): Ditto.
(*vec_extractv2si_1): Ditto.
* config/i386/sse.md (sse2_storehpd): Ditto.
(sse2_storelpd): Ditto.
(sse2_loadhpd): Ditto.
(sse2_loadlpd): Ditto.

PR target/37197
* config/i386/i386.md (clzsi2_abm): Fix operand 1 constraints.
(popcountsi2): Ditto.
(clzdi2_abm): Ditto.
(popcountdi2): Ditto.
(clzhi2_abm): Ditto.
(popcounthi2): Ditto.

testsuite/ChangeLog:

PR target/37184
* gcc.target/i386/pr37184.c: New test.

PR target/37191
* gcc.target/i386/pr37191.c: New test.

PR target/37197
* gcc.target/i386/pr37197.c: New test.


Added:
branches/gcc-4_3-branch/gcc/testsuite/gcc.target/i386/pr37184.c
  - copied unchanged from r139471,
trunk/gcc/testsuite/gcc.target/i386/pr37184.c
branches/gcc-4_3-branch/gcc/testsuite/gcc.target/i386/pr37191.c
  - copied unchanged from r139471,
trunk/gcc/testsuite/gcc.target/i386/pr37191.c
branches/gcc-4_3-branch/gcc/testsuite/gcc.target/i386/pr37197.c
  - copied unchanged from r139471,
trunk/gcc/testsuite/gcc.target/i386/pr37197.c
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/config/i386/i386.c
branches/gcc-4_3-branch/gcc/config/i386/i386.md
branches/gcc-4_3-branch/gcc/config/i386/mmx.md
branches/gcc-4_3-branch/gcc/config/i386/sse.md
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37191



[Bug other/37265] New: mt_allocator.cc:646: ICE: in gt_ggc_m_S, at ggc-page.c:1281

2008-08-28 Thread danglin at gcc dot gnu dot org
libtool: compile:  /home/dave/gnu/gcc/objdir/./gcc/xgcc -shared-libgcc
-B/home/d
ave/gnu/gcc/objdir/./gcc -nostdinc++
-L/home/dave/gnu/gcc/objdir/hppa-linux/libs
tdc++-v3/src -L/home/dave/gnu/gcc/objdir/hppa-linux/libstdc++-v3/src/.libs
-B/ho
me/dave/opt/gnu/gcc/gcc-4.4.0/hppa-linux/bin/
-B/home/dave/opt/gnu/gcc/gcc-4.4.0
/hppa-linux/lib/ -isystem /home/dave/opt/gnu/gcc/gcc-4.4.0/hppa-linux/include
-i
system /home/dave/opt/gnu/gcc/gcc-4.4.0/hppa-linux/sys-include
-I/home/dave/gnu/
gcc/objdir/hppa-linux/libstdc++-v3/include/hppa-linux
-I/home/dave/gnu/gcc/objdi
r/hppa-linux/libstdc++-v3/include
-I/home/dave/gnu/gcc/gcc/libstdc++-v3/libsupc+
+ -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual
-fdiagnostic
s-show-location=once -ffunction-sections -fdata-sections -g -O2 -D_GNU_SOURCE
-c
 ../../../../gcc/libstdc++-v3/src/pool_allocator.cc -o pool_allocator.o
>/dev/nu
ll 2>&1
../../../../gcc/libstdc++-v3/src/mt_allocator.cc: In member function 'void
__gnu
_cxx::__pool::_M_initialize(void (*)(void*))':
../../../../gcc/libstdc++-v3/src/mt_allocator.cc:646: internal compiler error:
i
n gt_ggc_m_S, at ggc-page.c:1281

[EMAIL PROTECTED]:~/gnu/gcc/objdir/gcc$ ./xgcc -B./ -v
Reading specs from ./specs
Target: hppa-linux
Configured with: ../gcc/configure --with-gnu-as --with-gnu-ld --enable-shared
--prefix=/home/dave/opt/gnu/gcc/gcc-4.4.0
--with-local-prefix=/home/dave/opt/gnu --enable-threads=posix
--enable-__cxa_atexit --build=hppa-linux --enable-clocale=gnu
--enable-java-gc=boehm --enable-java-awt=xlib --enable-languages=c++
Thread model: posix
gcc version 4.4.0 20080828 (experimental) [trunk revision 139692] (GCC)


-- 
   Summary: mt_allocator.cc:646: ICE: in gt_ggc_m_S, at ggc-
page.c:1281
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: danglin at gcc dot gnu dot org
 GCC build triplet: hppa-unknown-linux-gnu
  GCC host triplet: hppa-unknown-linux-gnu
GCC target triplet: hppa-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37265



[Bug libgcj/37264] /usr/ccs/bin/ld: Unsatisfied symbols in gnu/gcj/tools/gcj_dbto

2008-08-28 Thread danglin at gcc dot gnu dot org


--- Comment #1 from danglin at gcc dot gnu dot org  2008-08-28 13:13 ---
This is with:

-bash-3.2$ ./xgcc -B./ -v
Reading specs from ./specs
Target: hppa2.0w-hp-hpux11.11
Configured with: ../gcc/configure --with-gnu-as --with-as=/opt/gnu/bin/as
--enable-shared --disable-nls --with-local-prefix=/opt/gnu
--prefix=/opt/gnu/gcc/gcc-4.4.0 --enable-debug=no --enable-threads=posix
--with-mpfr=/opt/gnu/gcc/gcc-4.4.0 --with-gmp=/opt/gnu/gcc/gcc-4.3.0
--disable-libmudflap --enable-languages=c++,java
Thread model: posix
gcc version 4.4.0 20080828 (experimental) [trunk revision 139693] (GCC)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37264



[Bug libgcj/37264] New: /usr/ccs/bin/ld: Unsatisfied symbols in gnu/gcj/tools/gcj_dbto

2008-08-28 Thread danglin at gcc dot gnu dot org
libtool: link: /test/gnu/gcc/objdir/gcc/gcj
-B/test/gnu/gcc/objdir/hppa2.0w-hp-h
pux11.11/libjava/ -B/test/gnu/gcc/objdir/gcc/ -g -O2 -o .libs/gcj-dbtool
--main=
gnu.gcj.tools.gcj_dbtool.Main -shared-libgcc gnu/gcj/tools/gcj_dbtool/natMain.o
gnu/gcj/tools/.libs/gcj_dbtool.o 
-L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/l
ibjava/.libs -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libjava -L./.libs
-lgc
j -lpthread -lrt  -Wl,+b
-Wl,/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libjava/
.libs:/opt/gnu/gcc/gcc-4.4.0/lib
/usr/ccs/bin/ld: Unsatisfied symbols:
   bool java::lang::Class::isPrimitive() (first referenced in
gnu/gcj/tools/gcj_
dbtool/natMain.o) (data)
   bool java::lang::Class::isArray() (first referenced in
gnu/gcj/tools/gcj_dbto
ol/natMain.o) (data)
   _Jv_InitClass (first referenced in gnu/gcj/tools/gcj_dbtool/natMain.o)
(data)


-- 
   Summary: /usr/ccs/bin/ld: Unsatisfied symbols in
gnu/gcj/tools/gcj_dbto
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: danglin at gcc dot gnu dot org
 GCC build triplet: hppa2.0w-hp-hpux11.11
  GCC host triplet: hppa2.0w-hp-hpux11.11
GCC target triplet: hppa2.0w-hp-hpux11.11


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37264



[Bug fortran/37254] Reject valid PROCEDURE statement with implicit interface

2008-08-28 Thread dominiq at lps dot ens dot fr


--- Comment #5 from dominiq at lps dot ens dot fr  2008-08-28 13:05 ---
Grepping the sources it seems that the value of ??->intent associated with 'p'
is not reset to INTENT_UNKNOWN on "p => new_proc".


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37254



[Bug fortran/37253] Segmentation fault with procedure pointer

2008-08-28 Thread janus at gcc dot gnu dot org


--- Comment #4 from janus at gcc dot gnu dot org  2008-08-28 11:24 ---

> One should check whether other attributes are also missing.

attr.procedure is missing as well. I'll provide an extended patch.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37253



[Bug fortran/37254] Reject valid PROCEDURE statement with implicit interface

2008-08-28 Thread dominiq at lps dot ens dot fr


--- Comment #4 from dominiq at lps dot ens dot fr  2008-08-28 09:33 ---
It seems that some "attribute(s)" is(are) not properly (re)set.  The following
code 

module myMod
  CONTAINS
  subroutine proc1(arg1, arg2, arg3)
 integer :: arg1, arg2, arg3
 print*, arg1, arg2, arg3, 's ', arg1+arg2+arg3
  end subroutine proc1
  subroutine proc2(arg1, arg2, arg3)
 integer :: arg1, arg2, arg3
 print*, arg1, arg2, arg3, 'p ', arg1*arg2*arg3
  end subroutine proc2
  real function proc3( arg1 )
 integer :: arg1
 proc3 = arg1+7
  end function proc3
  subroutine proc4( arg1 )
 real, external :: arg1
 print*, 'the func: ', arg1(0)
  end subroutine proc4
  end module myMod

  program myProg
 use myMod
 PROCEDURE (), POINTER :: p => NULL()
 p => proc1
!1 call p(0, 2, 3)
 p => proc2
!2 call p(0, 2, 3)
 p => proc3
!3 call proc4( p )
!4 print*, 'the func: ', p(0)   ! "Unexpected array reference"
  end program myProg

compiles without error. If I remove the comments 1 to 4, I get the errors:

pointer_subs.f90:30.31:

 print*, 'the func: ', p(0)   ! "Unexpected array reference"
  1
Error: FUNCTION attribute conflicts with SUBROUTINE attribute in 'p' at (1)
pointer_subs.f90:29.16:

 call proc4( p )
   1
Error: Type/rank mismatch in argument 'arg1' at (1)

If I remove comments 1 and 2 or comments 3 and 4, the program compiles without
error and gives at run time respectively (after having applied the fix for
pr37253):

[ibook-dhum] f90/bug% a.out
   0   2   3 s5
   0   2   3 p0
[ibook-dhum] f90/bug% a.out
 the func:7.000
 the func:7.000


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37254



  1   2   >