[Bug c++/44320] New: ADL names are looked up in namespaces that are only referenced by template arguments

2010-05-29 Thread sstrasser at systemhaus-gruppe dot de
I believe that the following is a bug. it is accepted by MSVC and comeau.

GCC seems to ADL-lookup names in namespaces that are only used in the template
arguments of the function arguments, for example:

Aotherns::type a;
adl_func(a); //otherns::adl_func is called

this can cause unintended conflicts with non-function names in otherns, e.g.
if the ADL function is called apply and the argument type happens to be a
template instantiated with a type from namespace boost::mpl, only the fact that
a header containing the type boost::mpl::apply is included can cause a compile
error.

here's a simplified test case that causes a conflict:


namespace mpl{
  class apply{};
  class vector{};
}


templateclass T
void apply(T const ){}

templateclass T
class A{};

int main(){
  Ampl::vector a;
  apply(a);
}


-- 
   Summary: ADL names are looked up in namespaces that are only
referenced by template arguments
   Product: gcc
   Version: 4.3.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sstrasser at systemhaus-gruppe dot de


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



[Bug c++/44320] ADL names are looked up in namespaces that are only referenced by template arguments

2010-05-29 Thread sstrasser at systemhaus-gruppe dot de


--- Comment #1 from sstrasser at systemhaus-gruppe dot de  2010-05-29 07:45 
---
a workaround (other than renaming the ADL function) would be appreciated


-- 


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



[Bug bootstrap/43170] gcc 4.5 20100218 bootstrap compare fails on os x 10.6

2010-05-29 Thread iains at gcc dot gnu dot org


--- Comment #31 from iains at gcc dot gnu dot org  2010-05-29 07:47 ---
4.5-branch (as of r160013) has an error in config.gcc (which I just fixed on
trunk yesterday, with r159979) in which several t-make fragments are included
twice on x86_64-*-darwin*.  
I wonder if this could be the origin of the problem?

If anyone is interested to try it out I could make you a patch for 4.5-branch
to do the same fix.


-- 


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



[Bug bootstrap/44304] Building gcc 4.5.0 under Snow Leopard : stages 2 3 differ

2010-05-29 Thread iains at gcc dot gnu dot org


--- Comment #4 from iains at gcc dot gnu dot org  2010-05-29 07:49 ---
4.5-branch (as of r160013) has an error in config.gcc (which I just fixed on
trunk yesterday, with r159979) in which several t-make fragments are included
twice on x86_64-*-darwin*.  

If anyone is interested to try it out I could make you a patch for 4.5-branch
to do the same fix.
still, first we need a repeatable phenomenon - and to be sure that it's not
tool-related.


-- 

iains at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||iains at gcc dot gnu dot org


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



[Bug tree-optimization/44137] [4.6 Regression]: objc.dg/torture/tls/thr-init-2.m and thr-init.m

2010-05-29 Thread iains at gcc dot gnu dot org


--- Comment #3 from iains at gcc dot gnu dot org  2010-05-29 08:01 ---
(In reply to comment #2)
 Fixed after 159920 but before or including 159930.  At closer inspection, it
 has to be r159929. :)  On the other hand, from the patch message it seems it's
 just intended to be a stop-gap measure, so I'll leave it to Iain to close this
 PR.

Indeed, a stop-gap measure;  
whilst I believe that this PR is part a duplicate of PR44140 and part a
duplicate of 44132, I think to leave it open for now - and try to resolve once
PR44140 is fixed.  Thus I am going to mark it as depending on PR44140.


-- 

iains at gcc dot gnu dot org changed:

   What|Removed |Added

  BugsThisDependsOn||44140


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



[Bug c++/41233] Templated conversion operator produces symbol name that won't demangle

2010-05-29 Thread gcc at magfr dot user dot lysator dot liu dot se


--- Comment #4 from gcc at magfr dot user dot lysator dot liu dot se  
2010-05-29 08:17 ---
I have run head-first into this problem as well.

I have found that _ZN1tcvT_IiEEv ( t::operator intint() ) works but
_ZN1tcvKT_IiEEv ( t::operator int constint() ) fails so it seems the problem
is that the template isn't detected, and looking at the code in
libiberty/cp-demangle.c (r159908) we have line 4689 that tries to detect if the
cast target is a template type but only handles the case where the type is
unadorned by anything and then there is the comment on lines 4696-4699 that
explains the problem.


-- 

gcc at magfr dot user dot lysator dot liu dot se changed:

   What|Removed |Added

 CC||gcc at magfr dot user dot
   ||lysator dot liu dot se


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



[Bug c++/44320] ADL names are looked up in namespaces that are only referenced by template arguments

2010-05-29 Thread paolo dot carlini at oracle dot com


--- Comment #2 from paolo dot carlini at oracle dot com  2010-05-29 09:30 
---
Works fine in 4_5-branch and mainline, the behavior in 4_3-branch and
4_4-branch isn't a regression in any way, as fas as I can see.


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
  Known to work||4.5.0 4.5.1 4.6.0
 Resolution||WORKSFORME


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



[Bug middle-end/44321] New: attribute warn_unused_result fails under inlining.

2010-05-29 Thread davek at gcc dot gnu dot org
In the (to-be) attached testcase, GCC warns about an unused result when the
return value of the function is ignored, or cast to void, but it fails to warn
when the cast-to-void is hidden inside an inline function, like so:

$ cat -n wur.c
 1
 2  static inline void ignore_value (int i) { (void) i; }
 3
 4  extern int foo (void) __attribute__ ((warn_unused_result));
 5
 6  void bar1 (void)
 7  {
 8foo ();
 9  }
10
11  void bar2 (void)
12  {
13(void) foo ();
14  }
15
16  void bar3 (void)
17  {
18ignore_value (foo ());
19  }

$ gcc-4 -c wur.c  -o wur.o --save-temps -W -Wall -Wextra
wur.c: In function 'bar2':
wur.c:13:3: warning: ignoring return value of 'foo', declared with attribute
war
n_unused_result [-Wunused-result]
wur.c: In function 'bar1':
wur.c:8:7: warning: ignoring return value of 'foo', declared with attribute
warn
_unused_result [-Wunused-result]

This happens at all -O levels.  I haven't filled in the host/target/build
triplets because I don't suppose it is in any way specific to any of them.

BTW, it's interesting that the warnings come out in reverse order, is that
supposed to happen?


-- 
   Summary: attribute warn_unused_result fails under inlining.
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Keywords: diagnostic
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: davek at gcc dot gnu dot org


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



[Bug middle-end/44321] attribute warn_unused_result fails under inlining.

2010-05-29 Thread davek at gcc dot gnu dot org


--- Comment #1 from davek at gcc dot gnu dot org  2010-05-29 11:33 ---
Created an attachment (id=20771)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20771action=view)
testcase as per initial comment.


-- 


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



[Bug tree-optimization/44290] [4.5 Regression] arm linux kernel crahes when built with -fipa-sra

2010-05-29 Thread mikpe at it dot uu dot se


--- Comment #8 from mikpe at it dot uu dot se  2010-05-29 11:35 ---
(In reply to comment #6)
 I note that copypage-xscale.c:xscale_mc_copy_user_highpage() calls a __naked
 function to do the bulk copy.  Converting that to a plain inline function
 (changing 'pc' to 'lr' in the final instruction that restores the scrach 
 regs),
 does not prevent the crash.  So I suspect a plain C code miscompilation.

Actually that conversion away from __naked may have been flawed.  What I'm
seeing is that r148981 causes gcc to clone the __naked function and change its
calling conventions in ways that don't match the proper function call ABI. 
This breaks the body of the __naked function which is just a big asm()
statement.


-- 


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



[Bug middle-end/44321] attribute warn_unused_result fails under inlining.

2010-05-29 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2010-05-29 11:40 ---
You can add

void bar4 (void)
{
  int dummy;
  dummy = foo ();
}

so I'm not sure the ignore_value () function call isn't a use.  In fact
if you externalize that function it is at least a possible use.

Which also raises the question whether (void) is really more ignoring
the result than the assignment to a dummy variable.


-- 


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



[Bug target/44290] [4.5 Regression] arm linux kernel crahes when built with -fipa-sra, __naked attribute is broken

2010-05-29 Thread rguenth at gcc dot gnu dot org


--- Comment #9 from rguenth at gcc dot gnu dot org  2010-05-29 11:42 ---
(In reply to comment #8)
 (In reply to comment #6)
  I note that copypage-xscale.c:xscale_mc_copy_user_highpage() calls a __naked
  function to do the bulk copy.  Converting that to a plain inline function
  (changing 'pc' to 'lr' in the final instruction that restores the scrach 
  regs),
  does not prevent the crash.  So I suspect a plain C code miscompilation.
 
 Actually that conversion away from __naked may have been flawed.  What I'm
 seeing is that r148981 causes gcc to clone the __naked function and change its
 calling conventions in ways that don't match the proper function call ABI. 
 This breaks the body of the __naked function which is just a big asm()
 statement.

Well.  The arm backend needs to mark the function as used in non-visible
ways then.  Thus this is a target bug.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
  Component|tree-optimization   |target
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-05-29 11:42:59
   date||
Summary|[4.5 Regression] arm linux  |[4.5 Regression] arm linux
   |kernel crahes when built|kernel crahes when built
   |with -fipa-sra  |with -fipa-sra, __naked
   ||attribute is broken


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



[Bug target/44290] [4.5 Regression] arm linux kernel crahes when built with -fipa-sra, __naked attribute is broken

2010-05-29 Thread rguenth at gcc dot gnu dot org


--- Comment #10 from rguenth at gcc dot gnu dot org  2010-05-29 11:47 
---
Or rather, if you have

void __attribute__((naked)) foo (int i)
{
  asm(use i);
}

without any inputs refering to i that is invalid.  Like I see in the
attached preprocessed source:

static void __attribute__((naked)) __attribute__((no_instrument_function))
v4wb_copy_user_page(void *kto, const void *kfrom)
{
 asm(  stmfd   sp!, {r4, lr}   @ 2\n   mov r2, %0 
@ 1\n   ldmia   r1!, {r3, r4, ip, lr}   @ 4\n1: mcr
p15, 0, r0, c7, c6, 1   @ 1   invalidate D line\n   stmia   r0!,
{r3, r4, ip, lr}   @ 4\n   ldmia   r1!, {r3, r4, ip, lr}   @
4+1\n stmia   r0!, {r3, r4, ip, lr}   @ 4\n   ldmia   r1!, {r3, r4, ip,
lr}   @ 4\n   mcr p15, 0, r0, c7, c6, 1   @ 1   invalidate
D line\n   stmia   r0!, {r3, r4, ip, lr}   @ 4\n   ldmia   r1!,
{r3, r4, ip, lr}   @ 4\n   subsr2, r2, #1  @
1\n   stmia   r0!, {r3, r4, ip, lr}   @ 4\n   ldmneia r1!, {r3, r4, ip,
lr}   @ 4\n   bne 1b  @ 1\n   mcr
p15, 0, r1, c7, c10, 4  @ 1   drain WB\nldmfdsp!, {r4, pc} 
@ 3
# 46 /home/kraj/work/linux-2.6.34/arch/arm/mm/copypage-v4wb.c
 :
 : I (((1UL)  12) / 64));
}

kto and kfrom are unused.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID


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



[Bug target/44290] [4.5 Regression] arm linux kernel crahes when built with -fipa-sra, __naked attribute is broken

2010-05-29 Thread rguenth at gcc dot gnu dot org


--- Comment #11 from rguenth at gcc dot gnu dot org  2010-05-29 11:50 
---
(it seems quite stupid to have naked functions with only an asm inside in the
first place - you can equally well use plain assembly)


-- 


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



[Bug c/44322] New: Bogus warning when assigning pointer-to-array with both const and restrict

2010-05-29 Thread r dot c dot poss at uva dot nl
The following code is valid according to C99:

void * restrict const a[2];
void * restrict const (*p2)[2];

void foo(void) {
   p2 = a;
}

However GCC complains with:

a.c: In function 'foo':
a.c:14:7: warning: assignment from incompatible pointer type

If either const or restrict (or both) is omitted from the declaration of 
a and p, no warning is generated.

Despite the warning, code generation and optimization behave properly.

FYI, Clang 1.0.2 accepts this code without warning.


-- 
   Summary: Bogus warning when assigning pointer-to-array with both
const and restrict
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: r dot c dot poss at uva dot nl
 GCC build triplet: x86_64-apple-darwin10
  GCC host triplet: x86_64-apple-darwin10
GCC target triplet: x86_64-apple-darwin10


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



Re: [Bug target/44290] [4.5 Regression] arm linux kernel crahes when built with -fipa-sra, __naked attribute is broken

2010-05-29 Thread Andrew Pinski

The naked attribute should cause two things noinline and noclone.

Sent from my iPhone

On May 29, 2010, at 4:50 AM, rguenth at gcc dot gnu dot org gcc-bugzi...@gcc.gnu.org 
 wrote:





--- Comment #11 from rguenth at gcc dot gnu dot org  2010-05-29  
11:50 ---
(it seems quite stupid to have naked functions with only an asm  
inside in the

first place - you can equally well use plain assembly)


--


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



[Bug target/44290] [4.5 Regression] arm linux kernel crahes when built with -fipa-sra, __naked attribute is broken

2010-05-29 Thread pinskia at gmail dot com


--- Comment #12 from pinskia at gmail dot com  2010-05-29 13:30 ---
Subject: Re:  [4.5 Regression] arm linux kernel crahes when built with
-fipa-sra, __naked attribute is broken

The naked attribute should cause two things noinline and noclone.

Sent from my iPhone

On May 29, 2010, at 4:50 AM, rguenth at gcc dot gnu dot org
gcc-bugzi...@gcc.gnu.org 
  wrote:



 --- Comment #11 from rguenth at gcc dot gnu dot org  2010-05-29  
 11:50 ---
 (it seems quite stupid to have naked functions with only an asm  
 inside in the
 first place - you can equally well use plain assembly)


 -- 


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



-- 


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



[Bug target/44261] Multiplying -1 by NaN is not valid.

2010-05-29 Thread danglin at gcc dot gnu dot org


--- Comment #4 from danglin at gcc dot gnu dot org  2010-05-29 14:16 ---
Subject: Bug 44261

Author: danglin
Date: Sat May 29 14:16:11 2010
New Revision: 160027

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=160027
Log:
PR target/44261
config/pa/pa.md (negdf2_slow, negsf2_slow): New patterns.
(negdf2): Adjust expander pattern and use negdf2_slow.
(negsf2): Likewise.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/pa/pa.md


-- 


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



[Bug target/44266] stack frame lacks parameter save area

2010-05-29 Thread bergner at gcc dot gnu dot org


--- Comment #5 from bergner at gcc dot gnu dot org  2010-05-29 14:17 ---
Subject: Bug 44266

Author: bergner
Date: Sat May 29 14:17:26 2010
New Revision: 160028

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=160028
Log:
Backport from mainline:

2010-05-28  Alan Modra  amo...@gmail.com

PR target/44266
* config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Use
emit_library_call machinery to set up __tls_get_addr calls.

Modified:
branches/ibm/gcc-4_4-branch/gcc/ChangeLog.ibm
branches/ibm/gcc-4_4-branch/gcc/config/rs6000/rs6000.c


-- 


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



[Bug target/44290] [4.5 Regression] arm linux kernel crahes when built with -fipa-sra, __naked attribute is broken

2010-05-29 Thread mikpe at it dot uu dot se


--- Comment #13 from mikpe at it dot uu dot se  2010-05-29 14:27 ---
(In reply to comment #10)
 Or rather, if you have
 
 void __attribute__((naked)) foo (int i)
 {
   asm(use i);
 }
 
 without any inputs refering to i that is invalid.

Not according to gcc/doc/extend.texi:

 @item naked
 @cindex function without a prologue/epilogue code
 Use this attribute on the ARM, AVR, IP2K, RX and SPU ports to indicate that
 the specified function does not need prologue/epilogue sequences generated by
 the compiler.  It is up to the programmer to provide these sequences. The 
 only statements that can be safely included in naked functions are 
 @code{asm} statements that do not have operands.

Note: do not have operands.  Thus the only way such an asm() can refer to
parameters is by assuming a standard function call sequence and hardcoding
corresponding register numbers or stack frame offsets.

However, even if the asm() refers to those parameters via r(...) inputs,
gcc-4.5 changes the register assignment to not agree with the standard call
sequence, I'll attach a small test case showing that in a moment.


-- 


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



[Bug target/44261] Multiplying -1 by NaN is not valid.

2010-05-29 Thread danglin at gcc dot gnu dot org


--- Comment #5 from danglin at gcc dot gnu dot org  2010-05-29 14:33 ---
Fixed on trunk.


-- 

danglin at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug target/44290] [4.5 Regression] arm linux kernel crahes when built with -fipa-sra, __naked attribute is broken

2010-05-29 Thread mikpe at it dot uu dot se


--- Comment #14 from mikpe at it dot uu dot se  2010-05-29 14:39 ---
(In reply to comment #11)
 (it seems quite stupid to have naked functions with only an asm inside in the
 first place - you can equally well use plain assembly)

Except that with plain asm() for an entire function definition you'd also have
to include boring preamble/postamble stuff like .align/.type/.size if you want
it to appear as a proper function, and you still have to declarate a prototype.

And the reason for making it a separate function rather than an inline asm() is
probably related to register assignment: a separate function can (could) make
assumptions about parameter registers and scratch registers.  With inline asm()
you have to be much more elaborate, esp. if you have constraints that gcc
cannot express, like even/odd register pairs on ARM.


-- 


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



[Bug target/44290] [4.5 Regression] __naked attribute is broken

2010-05-29 Thread rguenth at gcc dot gnu dot org


--- Comment #15 from rguenth at gcc dot gnu dot org  2010-05-29 14:45 
---
(In reply to comment #13)
 (In reply to comment #10)
  Or rather, if you have
  
  void __attribute__((naked)) foo (int i)
  {
asm(use i);
  }
  
  without any inputs refering to i that is invalid.
 
 Not according to gcc/doc/extend.texi:
 
  @item naked
  @cindex function without a prologue/epilogue code
  Use this attribute on the ARM, AVR, IP2K, RX and SPU ports to indicate that
  the specified function does not need prologue/epilogue sequences generated 
  by
  the compiler.  It is up to the programmer to provide these sequences. The 
  only statements that can be safely included in naked functions are 
  @code{asm} statements that do not have operands.
 
 Note: do not have operands.  Thus the only way such an asm() can refer to
 parameters is by assuming a standard function call sequence and hardcoding
 corresponding register numbers or stack frame offsets.

Then the target has to properly communicate this to the middle-end.

 However, even if the asm() refers to those parameters via r(...) inputs,
 gcc-4.5 changes the register assignment to not agree with the standard call
 sequence, I'll attach a small test case showing that in a moment.

I'd have required dummy inputs like g (kto), g (kfrom) not used by
the actual assembly.

For now re-open as a target bug.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |
Summary|[4.5 Regression] arm linux  |[4.5 Regression] __naked
   |kernel crahes when built|attribute is broken
   |with -fipa-sra, __naked |
   |attribute is broken |


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



[Bug target/44290] [4.5 Regression] __naked attribute is broken

2010-05-29 Thread rguenth at gcc dot gnu dot org


--- Comment #16 from rguenth at gcc dot gnu dot org  2010-05-29 14:46 
---
And CC a arm maintainer.  There might be more target-specific attributes that
need adjustment.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||rearnsha at gcc dot gnu dot
   ||org


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



[Bug target/44290] [4.5 Regression] __naked attribute is broken

2010-05-29 Thread mikpe at it dot uu dot se


--- Comment #17 from mikpe at it dot uu dot se  2010-05-29 14:47 ---
Created an attachment (id=20772)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20772action=view)
test case from copypage-xscale.c

This is distilled from the kernel's copypage-xscale.c file and illustrates the
issue.  With gcc-4.4 the __naked__ function foo() is called with the standard
call sequence register assignment, so the asm() body of foo() works.  With
gcc-4.5 foo() is cloned and gets its second parameter `to' in r0 (not r1 as
expected), and the body of foo() is modified to set up the actual first
parameter (fie[0]) in r1 (not r0 as expected).  Obviously the asm() then
breaks.

Compiling with -fno-ipa-cp avoids this problem, as does adding __noclone__ and
__noinline__ to foo()'s function definition.

I don't immediately see how to enforce __noclone__ and __noinline__ in the ARM
backend when it sees __naked__.  Any ideas?


-- 


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



[Bug bootstrap/44315] [4.6 Regression] Circular build/gencondmd.o - insn-flags.h dependency dropped

2010-05-29 Thread hjl at gcc dot gnu dot org


--- Comment #2 from hjl at gcc dot gnu dot org  2010-05-29 15:05 ---
Subject: Bug 44315

Author: hjl
Date: Sat May 29 15:05:30 2010
New Revision: 160029

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=160029
Log:
Add a missing `\'.

2010-05-29  H.J. Lu  hongjiu...@intel.com

PR bootstrap/44315
* Makefile.in (build/gencondmd.o): Add a missing `\'.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/Makefile.in


-- 


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



[Bug libstdc++/44268] abi docs say that hppa-linux defaults to libgcc_s.so.2

2010-05-29 Thread dave at hiauly1 dot hia dot nrc dot ca


--- Comment #5 from dave at hiauly1 dot hia dot nrc dot ca  2010-05-29 
15:11 ---
Subject: Re:  abi docs say that hppa-linux defaults to libgcc_s.so.2

  Dave, when did the hppa-linux so version change from 2 to 4?
  I'd like to document that, rather than just say it's always 1 or 4
 
 Oops, I have messed up.  After some discussion, it was decided to
 revert the change.  It was supposed to have been reverted on 2010-01-31,
 but the change apparently didn't work at least on the trunk.  The
 original change was made on 2010-01-02.

On further review, I see that I didn't mess up the revert in January!

The sjlj and elf shared library versions were set to 3 and 4, respectively,
in revision 109894 on Jan. 18, 2006 on the trunk.  The version was previously
set to 2 in revision 77920 on Feb. 16, 2004.  Prior to that, the version
was 1.  I would have to dig some more to determine the version numbers
for specific releases.

Dave


-- 


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



[Bug rtl-optimization/44323] New: IRA/reload moves asm statement

2010-05-29 Thread hjl dot tools at gmail dot com
On Linux/x86-64, IRA/reload moves asm statement by
adding movss at -O2:

[...@gnu-6 vzeroupper-1]$ cat foo.c
extern void bar2 (void);
float
foo (float y)
{
  asm volatile (nop);
  bar2 ();
  return y;
}
[...@gnu-6 vzeroupper-1]$ gcc -S -O foo.c
[...@gnu-6 vzeroupper-1]$ cat foo.s
.file   foo.c
.text
.globl foo
.type   foo, @function
foo:
.LFB0:
.cfi_startproc
subq$24, %rsp
.cfi_def_cfa_offset 32
movss   %xmm0, 12(%rsp)
#APP
# 5 foo.c 1
nop
# 0  2
#NO_APP
callbar2
movss   12(%rsp), %xmm0
addq$24, %rsp
.cfi_def_cfa_offset 8
ret
.cfi_endproc
.LFE0:
.size   foo, .-foo
.ident  GCC: (GNU) 4.4.3 20100127 (Red Hat 4.4.3-4)
.section.note.GNU-stack,,@progbits
[...@gnu-6 vzeroupper-1]$ gcc -S -O2 foo.c
[...@gnu-6 vzeroupper-1]$ cat foo.s
.file   foo.c
.text
.p2align 4,,15
.globl foo
.type   foo, @function
foo:
.LFB0:
.cfi_startproc
subq$24, %rsp
.cfi_def_cfa_offset 32
#APP
# 5 foo.c 1
nop
# 0  2
#NO_APP
movss   %xmm0, (%rsp)
callbar2
movss   (%rsp), %xmm0
addq$24, %rsp
.cfi_def_cfa_offset 8
ret
.cfi_endproc
.LFE0:
.size   foo, .-foo
.ident  GCC: (GNU) 4.4.3 20100127 (Red Hat 4.4.3-4)
.section.note.GNU-stack,,@progbits
[...@gnu-6 vzeroupper-1]$


-- 
   Summary: IRA/reload moves asm statement
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
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=44323



Re: [Bug rtl-optimization/44323] New: IRA/reload moves asm statement

2010-05-29 Thread Andrew Pinski
I don't think this is valid. You cannot depend on where the spill will  
happen around a function call. It is spilling to save the volatile  
register. With -O, we don't use volatile registers to keep variables  
across functions. While at -O2 we do so it saves it right before the  
function call.


Sent from my iPhone

On May 29, 2010, at 8:25 AM, hjl dot tools at gmail dot com gcc-bugzi...@gcc.gnu.org 
 wrote:



On Linux/x86-64, IRA/reload moves asm statement by
adding movss at -O2:

[...@gnu-6 vzeroupper-1]$ cat foo.c
extern void bar2 (void);
float
foo (float y)
{
 asm volatile (nop);
 bar2 ();
 return y;
}
[...@gnu-6 vzeroupper-1]$ gcc -S -O foo.c
[...@gnu-6 vzeroupper-1]$ cat foo.s
   .file   foo.c
   .text
.globl foo
   .type   foo, @function
foo:
.LFB0:
   .cfi_startproc
   subq$24, %rsp
   .cfi_def_cfa_offset 32
   movss   %xmm0, 12(%rsp)
#APP
# 5 foo.c 1
   nop
# 0  2
#NO_APP
   callbar2
   movss   12(%rsp), %xmm0
   addq$24, %rsp
   .cfi_def_cfa_offset 8
   ret
   .cfi_endproc
.LFE0:
   .size   foo, .-foo
   .ident  GCC: (GNU) 4.4.3 20100127 (Red Hat 4.4.3-4)
   .section.note.GNU-stack,,@progbits
[...@gnu-6 vzeroupper-1]$ gcc -S -O2 foo.c
[...@gnu-6 vzeroupper-1]$ cat foo.s
   .file   foo.c
   .text
   .p2align 4,,15
.globl foo
   .type   foo, @function
foo:
.LFB0:
   .cfi_startproc
   subq$24, %rsp
   .cfi_def_cfa_offset 32
#APP
# 5 foo.c 1
   nop
# 0  2
#NO_APP
   movss   %xmm0, (%rsp)
   callbar2
   movss   (%rsp), %xmm0
   addq$24, %rsp
   .cfi_def_cfa_offset 8
   ret
   .cfi_endproc
.LFE0:
   .size   foo, .-foo
   .ident  GCC: (GNU) 4.4.3 20100127 (Red Hat 4.4.3-4)
   .section.note.GNU-stack,,@progbits
[...@gnu-6 vzeroupper-1]$


--
  Summary: IRA/reload moves asm statement
  Product: gcc
  Version: 4.6.0
   Status: UNCONFIRMED
 Severity: normal
 Priority: P3
Component: rtl-optimization
   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=44323



[Bug rtl-optimization/44323] IRA/reload moves asm statement

2010-05-29 Thread pinskia at gmail dot com


--- Comment #1 from pinskia at gmail dot com  2010-05-29 15:39 ---
Subject: Re:   New: IRA/reload moves asm statement

I don't think this is valid. You cannot depend on where the spill will  
happen around a function call. It is spilling to save the volatile  
register. With -O, we don't use volatile registers to keep variables  
across functions. While at -O2 we do so it saves it right before the  
function call.

Sent from my iPhone

On May 29, 2010, at 8:25 AM, hjl dot tools at gmail dot com
gcc-bugzi...@gcc.gnu.org 
  wrote:

 On Linux/x86-64, IRA/reload moves asm statement by
 adding movss at -O2:

 [...@gnu-6 vzeroupper-1]$ cat foo.c
 extern void bar2 (void);
 float
 foo (float y)
 {
  asm volatile (nop);
  bar2 ();
  return y;
 }
 [...@gnu-6 vzeroupper-1]$ gcc -S -O foo.c
 [...@gnu-6 vzeroupper-1]$ cat foo.s
.file   foo.c
.text
 .globl foo
.type   foo, @function
 foo:
 .LFB0:
.cfi_startproc
subq$24, %rsp
.cfi_def_cfa_offset 32
movss   %xmm0, 12(%rsp)
 #APP
 # 5 foo.c 1
nop
 # 0  2
 #NO_APP
callbar2
movss   12(%rsp), %xmm0
addq$24, %rsp
.cfi_def_cfa_offset 8
ret
.cfi_endproc
 .LFE0:
.size   foo, .-foo
.ident  GCC: (GNU) 4.4.3 20100127 (Red Hat 4.4.3-4)
.section.note.GNU-stack,,@progbits
 [...@gnu-6 vzeroupper-1]$ gcc -S -O2 foo.c
 [...@gnu-6 vzeroupper-1]$ cat foo.s
.file   foo.c
.text
.p2align 4,,15
 .globl foo
.type   foo, @function
 foo:
 .LFB0:
.cfi_startproc
subq$24, %rsp
.cfi_def_cfa_offset 32
 #APP
 # 5 foo.c 1
nop
 # 0  2
 #NO_APP
movss   %xmm0, (%rsp)
callbar2
movss   (%rsp), %xmm0
addq$24, %rsp
.cfi_def_cfa_offset 8
ret
.cfi_endproc
 .LFE0:
.size   foo, .-foo
.ident  GCC: (GNU) 4.4.3 20100127 (Red Hat 4.4.3-4)
.section.note.GNU-stack,,@progbits
 [...@gnu-6 vzeroupper-1]$


 -- 
   Summary: IRA/reload moves asm statement
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
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=44323



-- 


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



[Bug rtl-optimization/44323] IRA/reload moves asm statement

2010-05-29 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2010-05-29 15:56 ---
There is no bug here since the asm does not say it touches any registers so
xmm0 is live across the asm.  Reload/IRA can insert the spilling/saving before
or after the asm.  Both places are valid.  


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug bootstrap/44315] [4.6 Regression] Circular build/gencondmd.o - insn-flags.h dependency dropped

2010-05-29 Thread hjl dot tools at gmail dot com


--- Comment #3 from hjl dot tools at gmail dot com  2010-05-29 16:23 ---
A patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2010-05/msg02325.html


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

URL||http://gcc.gnu.org/ml/gcc-
   ||patches/2010-
   ||05/msg02325.html


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



[Bug middle-end/44324] New: gcc.dg/tree-ssa/ipa-cp-1.c failed

2010-05-29 Thread hjl dot tools at gmail dot com
On Linux/ia32, gcc.dg/tree-ssa/ipa-cp-1.c failed:

FAIL: gcc.dg/tree-ssa/ipa-cp-1.c scan-tree-dump-times optimized
very_long_function.constprop.0 \(\) 3


-- 
   Summary: gcc.dg/tree-ssa/ipa-cp-1.c failed
   Product: gcc
   Version: 4.6.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=44324



[Bug middle-end/44324] [4.6 Regression] gcc.dg/tree-ssa/ipa-cp-1.c failed

2010-05-29 Thread hjl dot tools at gmail dot com


--- Comment #1 from hjl dot tools at gmail dot com  2010-05-29 17:00 ---
It is caused by revision 160016:

http://gcc.gnu.org/ml/gcc-cvs/2010-05/msg01075.html


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

Summary|gcc.dg/tree-ssa/ipa-cp-1.c  |[4.6 Regression]
   |failed  |gcc.dg/tree-ssa/ipa-cp-1.c
   ||failed
   Target Milestone|--- |4.6.0


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



[Bug middle-end/44325] New: [4.6 regression] FAIL: gcc.dg/vect/vect-109.c

2010-05-29 Thread hjl dot tools at gmail dot com
On Linux/ia64, revision 159926 gave:

FAIL: gcc.dg/vect/vect-109.c scan-tree-dump-times vect vectorized 1 loops 2

Revision 159909 is OK.


-- 
   Summary: [4.6 regression] FAIL: gcc.dg/vect/vect-109.c
   Product: gcc
   Version: 4.6.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=44325



[Bug middle-end/44325] [4.6 regression] FAIL: gcc.dg/vect/vect-109.c

2010-05-29 Thread hjl dot tools at gmail dot com


--- Comment #1 from hjl dot tools at gmail dot com  2010-05-29 17:05 ---
It may be caused by revision 159920:

http://gcc.gnu.org/ml/gcc-cvs/2010-05/msg00977.html


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu dot
   ||org
   Target Milestone|--- |4.6.0


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



[Bug tree-optimization/44306] [4.6 Regression] 464.h264ref fails to build.

2010-05-29 Thread spop at gcc dot gnu dot org


--- Comment #5 from spop at gcc dot gnu dot org  2010-05-29 17:14 ---
Subject: Bug 44306

Author: spop
Date: Sat May 29 17:14:31 2010
New Revision: 160031

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=160031
Log:
Don't use unshare_expr when not necessary.

2010-05-29  Sebastian Pop  sebastian@amd.com

PR middle-end/44306
* gcc.dg/tree-ssa/pr44306.c: New.

* tree-if-conv.c (is_true_predicate): New.
(is_predicated): Use is_true_predicate.
(add_to_predicate_list): Same.  Do not use unshare_expr.
(add_to_dst_predicate_list): Same.

Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr44306.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-if-conv.c


-- 


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



[Bug tree-optimization/44306] [4.6 Regression] 464.h264ref fails to build.

2010-05-29 Thread spop at gcc dot gnu dot org


--- Comment #6 from spop at gcc dot gnu dot org  2010-05-29 17:15 ---
Fixed.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug middle-end/44321] attribute warn_unused_result fails under inlining.

2010-05-29 Thread bonzini at gnu dot org


--- Comment #3 from bonzini at gnu dot org  2010-05-29 17:32 ---
I don't think this bug is of any use.  Unlike nonnull, unused return values do
not trigger undesirable optimizations and (as far as I can tell) cannot
possibly result in miscompilation.

This bug is indeed about a loophole, and one that could indeed cause some bugs
(even security bugs).  But, fixing it would also make it impossible for many
projects to use -Werror, since they have to deal with the fact that __wur was
used inappropriately by glibc.

Adding another attribute and making __wur overridable BTW would not be a
solution since glibc would certainly switch to the new __really_wur attribute
and we'd be in the same situation.  :-)


-- 


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



[Bug middle-end/44321] attribute warn_unused_result fails under inlining.

2010-05-29 Thread rguenth at gcc dot gnu dot org


--- Comment #4 from rguenth at gcc dot gnu dot org  2010-05-29 17:46 ---
(In reply to comment #3)
 I don't think this bug is of any use.  Unlike nonnull, unused return values do
 not trigger undesirable optimizations and (as far as I can tell) cannot
 possibly result in miscompilation.
 
 This bug is indeed about a loophole, and one that could indeed cause some bugs
 (even security bugs).  But, fixing it would also make it impossible for many
 projects to use -Werror, since they have to deal with the fact that __wur was
 used inappropriately by glibc.
 
 Adding another attribute and making __wur overridable BTW would not be a
 solution since glibc would certainly switch to the new __really_wur attribute
 and we'd be in the same situation.  :-)

True, but if int dummy = foo() works then we can also make (void) foo ()
work.


-- 


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



[Bug bootstrap/44315] [4.6 Regression] Circular build/gencondmd.o - insn-flags.h dependency dropped

2010-05-29 Thread mrs at gcc dot gnu dot org


--- Comment #4 from mrs at gcc dot gnu dot org  2010-05-29 17:58 ---
I believe this has already been fixed by r160020.


-- 

mrs at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||mikestump at comcast dot net
 Status|NEW |RESOLVED
 Resolution||FIXED


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



[Bug target/44290] [4.5 Regression] __naked attribute is broken

2010-05-29 Thread mikpe at it dot uu dot se


--- Comment #18 from mikpe at it dot uu dot se  2010-05-29 18:00 ---
Created an attachment (id=20773)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20773action=view)
linux kernel workaround for attribute naked breakage

This patch makes the Linux kernel add noinline and noclone attributes to
functions declared __naked.  This allows gcc-4.5 to build a working 2.6.34
Linux kernel for my mach-iop32x/n2100 ARM box.

Khem: can you check if this kernel-side workaround fixes your problem?

Eventually I'd like the kernel to not use __naked, but that is non-trivial. 
This fix should work now and be easily backportable to older kernels.


-- 


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



[Bug middle-end/44324] [4.6 Regression] gcc.dg/tree-ssa/ipa-cp-1.c failed

2010-05-29 Thread hubicka at gcc dot gnu dot org


--- Comment #2 from hubicka at gcc dot gnu dot org  2010-05-29 18:04 ---
Subject: Bug 44324

Author: hubicka
Date: Sat May 29 18:04:02 2010
New Revision: 160033

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=160033
Log:

PR middle-end/44324

Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-cp.c


-- 


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



[Bug middle-end/44295] [4.6 Regression] Failed to build 483.xalancbmk in SPEC CPU 2006

2010-05-29 Thread hjl dot tools at gmail dot com


--- Comment #3 from hjl dot tools at gmail dot com  2010-05-29 18:35 ---
Created an attachment (id=20774)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20774action=view)
A reduced testcase

[...@gnu-32 delta]$ /export/gnu/import/rrs/159912/usr/bin/gcc -S -O3 pr44295.ii
pr44295.ii: In member function \u2018xercesc_2_5::DOMNodeList*
xercesc_2_5::DOMDocumentImpl::getElementsByTagName(const XMLCh*) const\u2019:
pr44295.ii:157:68: error: edge points to wrong declaration:
 function_decl 0x7f3c21ea3600
_ZN11xercesc_2_519DOMDeepNodeListPoolINS_19DOMDeepNodeListImplEEC2Embm.clone.2
type method_type 0x7f3c220d8000
type void_type 0x7f3c2210de70 void type_6 VOID
align 8 symtab 0 alias set -1 canonical type 0x7f3c2210de70
pointer_to_this pointer_type 0x7f3c2210df18
QI
size integer_cst 0x7f3c220f8758 constant 8
unit size integer_cst 0x7f3c220f8780 constant 1
align 8 symtab 0 alias set -1 canonical type 0x7f3c220879d8 method
basetype record_type 0x7f3c22082a80 DOMDeepNodeListPool
arg-types tree_list 0x7f3c21e9f3e8 value pointer_type 0x7f3c22082b28
chain tree_list 0x7f3c2211d5f0 value void_type 0x7f3c2210de70
void
pointer_to_this pointer_type 0x7f3c2208a5e8
asm_written used static decl_5 QI file pr44295.ii line 126 col 25 align 16
context record_type 0x7f3c22082a80 DOMDeepNodeListPool initial error_mark
0x7f3c22100ca8 abstract_origin function_decl 0x7f3c2207b800
DOMDeepNodeListPool
arguments parm_decl 0x7f3c220b3a18 this
type pointer_type 0x7f3c22082b28 type record_type 0x7f3c22082a80
DOMDeepNodeListPool
public unsigned DI
size integer_cst 0x7f3c220f8a50 constant 64
unit size integer_cst 0x7f3c220f8a78 constant 8
align 64 symtab 0 alias set 16 canonical type 0x7f3c22082b28
pointer_to_this pointer_type 0x7f3c21ecac78
readonly used unsigned DI file pr44295.ii line 126 col 239 size
integer_cst 0x7f3c220f8a50 64 unit size integer_cst 0x7f3c220f8a78 8
align 64 context function_decl 0x7f3c21ea3600
_ZN11xercesc_2_519DOMDeepNodeListPoolINS_19DOMDeepNodeListImplEEC2Embm.clone.2
abstract_origin parm_decl 0x7f3c22088220 this
(reg/f:DI 3 bx [orig:70 this ] [70]) arg-type pointer_type
0x7f3c22082b28
incoming-rtl (reg:DI 5 di [ this ])
result result_decl 0x7f3c220d3e80 D.2898 type void_type 0x7f3c2210de70
void
used ignored VOID file pr44295.ii line 130 col 3
align 8 context function_decl 0x7f3c21ea3600
_ZN11xercesc_2_519DOMDeepNodeListPoolINS_19DOMDeepNodeListImplEEC2Embm.clone.2
abstract_origin result_decl 0x7f3c22080e80 D.2669
full-name
xercesc_2_5::DOMDeepNodeListPoolTVal::DOMDeepNodeListPool(XMLSize_t, bool,
XMLSize_t = 128) [with TVal = xercesc_2_5::DOMDeepNodeListImpl, XMLSize_t =
long unsigned int]
pending-inline-info 0x7f3c220a1310 template-info 0x7f3c220764a0
(mem:QI (symbol_ref:DI
(_ZN11xercesc_2_519DOMDeepNodeListPoolINS_19DOMDeepNodeListImplEEC2Embm.clone.2)
[flags 0x3] function_decl 0x7f3c21ea3600
_ZN11xercesc_2_519DOMDeepNodeListPoolINS_19DOMDeepNodeListImplEEC2Embm.clone.2)
[0 S1 A8])
 Instead of: function_decl 0x7f3c2207b700 __comp_ctor 
type method_type 0x7f3c22087930
type void_type 0x7f3c2210de70 void type_6 VOID
align 8 symtab 0 alias set -1 canonical type 0x7f3c2210de70
pointer_to_this pointer_type 0x7f3c2210df18
QI
size integer_cst 0x7f3c220f8758 constant 8
unit size integer_cst 0x7f3c220f8780 constant 1
align 8 symtab 0 alias set -1 canonical type 0x7f3c220879d8 method
basetype record_type 0x7f3c22082a80 DOMDeepNodeListPool
arg-types tree_list 0x7f3c22084870 value pointer_type 0x7f3c22082b28
chain tree_list 0x7f3c220847d0 value integer_type 0x7f3c2210d690
long unsigned int
chain tree_list 0x7f3c220847a8 value boolean_type
0x7f3c2210d9d8 bool
chain tree_list 0x7f3c22084780
purpose integer_cst 0x7f3c22031848 constant 128 value
integer_type 0x7f3c2210d690 long unsigned int
chain tree_list 0x7f3c2211d5f0 value void_type
0x7f3c2210de70 void
pointer_to_this pointer_type 0x7f3c2208a5e8
addressable used public static weak decl_5 QI defer-output file pr44295.ii
line 126 col 25 align 16 context record_type 0x7f3c22082a80
DOMDeepNodeListPool initial block 0x7f3c220a2580 abstract_origin
function_decl 0x7f3c2207b800 DOMDeepNodeListPool
arguments parm_decl 0x7f3c22088908 this
type pointer_type 0x7f3c22082b28 type record_type 0x7f3c22082a80
DOMDeepNodeListPool
public unsigned DI
size integer_cst 0x7f3c220f8a50 constant 64
unit size integer_cst 0x7f3c220f8a78 constant 8
align 64 symtab 0 alias set 16 canonical type 0x7f3c22082b28
pointer_to_this pointer_type 0x7f3c21ecac78
readonly used unsigned DI file pr44295.ii line 126 

[Bug bootstrap/44315] [4.6 Regression] Circular build/gencondmd.o - insn-flags.h dependency dropped

2010-05-29 Thread hjl dot tools at gmail dot com


--- Comment #5 from hjl dot tools at gmail dot com  2010-05-29 18:40 ---
(In reply to comment #4)
 I believe this has already been fixed by r160020.
 

Revision 160020:

http://gcc.gnu.org/ml/gcc-cvs/2010-05/msg01079.html

doesn't fix this bug. In fact, it breaks bootstrap:

http://gcc.gnu.org/ml/gcc-regression/2010-05/msg00395.html

Please check out revision 160020 to see it yourselves.


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |


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



[Bug target/44326] New: NONDEBUG_INSN_P should be used in implicit-zee.c

2010-05-29 Thread hjl dot tools at gmail dot com
implicit-zee.c has

 zeinsn_list = VEC_alloc (rtx, heap, 8);
 FOR_EACH_BB (curr_block)
   {
 FOR_BB_INSNS (curr_block, curr_insn)
   {
 if (!INSN_P (curr_insn))
   continue;

 type = for_each_rtx (PATTERN (curr_insn),
  is_set_with_extension_DI,
  (void *)set_insn);

 if (!type)
   continue;

I believe NONDEBUG_INSN_P should be used here instead of INSN_P.


-- 
   Summary: NONDEBUG_INSN_P should be used in implicit-zee.c
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
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=44326



[Bug target/44326] NONDEBUG_INSN_P should be used in implicit-zee.c

2010-05-29 Thread hjl dot tools at gmail dot com


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

   Target Milestone|--- |4.6.0


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



[Bug target/44165] 5/15/2010 snapshot build failure on hppa Linux

2010-05-29 Thread danglin at gcc dot gnu dot org


--- Comment #2 from danglin at gcc dot gnu dot org  2010-05-29 20:18 ---
This was introduced by the following change:

2010-05-12  Jan Hubicka  j...@suse.cz

* cgraph.h (struct varpool_node): Add aux.
* varasm.c (find_decl_and_mark_needed): Force output of varpool nodes.
* varpool.c (varpool_remove_node): Do not remove initializer.
(varpool_reset_queue): Export.
(varpool_finalize_decl): Volatile vars are forced to be output.
* lto-symtab.c (lto_varpool_replace_node): Clear out initializer of
replaced decl.
* ipa.c (enqueue_cgraph_node, enqueue_varpool_node,
process_references, varpool_can_remove_if_no_refs): New functions.
(cgraph_remove_unreachable_nodes): Handle variables too.


-- 


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



[Bug bootstrap/44315] [4.6 Regression] Circular build/gencondmd.o - insn-flags.h dependency dropped

2010-05-29 Thread mrs at gcc dot gnu dot org


--- Comment #6 from mrs at gcc dot gnu dot org  2010-05-29 20:26 ---
Subject: Bug 44315

Author: mrs
Date: Sat May 29 20:26:12 2010
New Revision: 160035

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=160035
Log:
2010-05-29  H.J. Lu  hongjiu...@intel.com

PR bootstrap/44315
* Makefile.in (build/gencondmd.o): Remove TM_H := $(GTM_H).
Filter out insn-flags.h.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/Makefile.in


-- 


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



[Bug bootstrap/44315] [4.6 Regression] Circular build/gencondmd.o - insn-flags.h dependency dropped

2010-05-29 Thread mrs at gcc dot gnu dot org


--- Comment #7 from mrs at gcc dot gnu dot org  2010-05-29 20:30 ---
Ok, should be fixed now.


-- 

mrs at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED


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



[Bug fortran/44292] [libgfortran ABI breakage] Increase internal size of RECL= of the OPEN statement

2010-05-29 Thread tkoenig at gcc dot gnu dot org


--- Comment #1 from tkoenig at gcc dot gnu dot org  2010-05-29 22:20 ---
Confirmed.


-- 

tkoenig at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-05-29 22:20:03
   date||


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



[Bug target/44165] 5/15/2010 snapshot build failure on hppa Linux

2010-05-29 Thread danglin at gcc dot gnu dot org


--- Comment #3 from danglin at gcc dot gnu dot org  2010-05-29 22:25 ---
Subject: Bug 44165

Author: danglin
Date: Sat May 29 22:24:59 2010
New Revision: 160038

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=160038
Log:
PR target/44165
* config/pa/pa32-linux.h (CTOR_LIST_BEGIN): Mark __CTOR_LIST__ as used.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/pa/pa32-linux.h


-- 


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



[Bug target/44165] 5/15/2010 snapshot build failure on hppa Linux

2010-05-29 Thread danglin at gcc dot gnu dot org


--- Comment #4 from danglin at gcc dot gnu dot org  2010-05-29 22:29 ---
Fixed by patch.


-- 

danglin at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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



[Bug java/44327] New: build_java_method_aliases should use cgraph_node-same_body aliases list

2010-05-29 Thread rguenth at gcc dot gnu dot org
This blocks moving finalizing the compilation unit last in
cp_write_global_declarations.


-- 
   Summary: build_java_method_aliases should use cgraph_node-
same_body aliases list
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org


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



[Bug c++/44328] New: switch/case optimization produces an invalid jump table index

2010-05-29 Thread eblot dot ml at gmail dot com
Notes: 
 1. the same issue occurs on x86 and x86_64 linux hosts, with a GCC
cross-compiler of the same version is built with the same options
 2. the same issue occurs with GCC cross compiler 4.4.3 (same build options,
without the MPC host library)

I'm afraid I failed to understand something obvious, as this bug seems so
weird that I can't really believe it is an actual compiler bug. Please let me
know if/where I'm wrong.

I first encountered this bug while compiling the eCos 3.0+ kernel for an
ARM926 target.
The issue appends within the fopen.cxx source file (fopen() implementation):
the 'mode' parameter is converted from a char string - such as r - into a
fcntl enumerated value - O_RDONLY in this case, through two switch/case
statements

When built with -O0 or-01, the compiler does not emit a jump table for the
switch/case and the produced 'mode' integer value is the expected one.
When build with -O2 or -O3, the compiler does emit a jump table, but the jump
table is invalid: the net result is that for the '0' case value, the jump table
index points to an address that is outside the jump table, and the value
returned from the jump table is random.

When the -Wtype-limits option switch is used, the compiler does emit a warning,
but I failed to understand the reason for this warning.

I shrinked down the 'fopen.cxx' code to a single, simple function and the
assembly code contains the same invalid statement as it is in the original
file, the type-limits warning is also the same.
The source code does not rely on any other file (no header file).

//- C source --

#define O_RDONLY (10)
#define O_WRONLY (11)
#define O_RDWR   (O_RDONLY|O_WRONLY)
#define O_CREAT  (13)
#define O_TRUNC  (16)

typedef enum {
OM_READ = 0,
OM_WRITE,
OM_READWRITE_NOCREATE,
OM_READWRITE_CREATE
} OpenMode;

extern C int open(const char *name, int mode);

void open_file(const char *filename, const OpenMode rw)
{
int mode = 0;

switch( rw )
{
case OM_WRITE:
mode = O_WRONLY|O_CREAT|O_TRUNC;
break;
case OM_READ:
mode = O_RDONLY;
break;
case OM_READWRITE_NOCREATE:
mode = O_RDWR;
break;
case OM_READWRITE_CREATE:
mode = O_RDWR|O_CREAT|O_TRUNC;
break;
}

open( filename, mode );
}
// - end of C code 

The above C code is built with the following command:
arm-eabi-gcc -c -O2 -mcpu=arm926ej-s -fno-rtti -fno-exceptions -Wtype-limits \
 -o fopen.o fopen.cxx 

The compiler emits the following warning:
fopen.cxx: In function ‘void open_file(const char*, OpenMode)’:
fopen.cxx:16:6: warning: comparison always true due to limited range of data
type

The disassemble code looks like the following:

//- ASM ---
fopen.o: file format elf32-littlearm

Disassembly of section .text:

 _Z9open_filePKc8OpenMode:
   0:   e59f300cldr r3, [pc, #12]   ; 14
_Z9open_filePKc8OpenMode+0x14
   4:   e2411001sub r1, r1, #1
   8:   e20110ffand r1, r1, #255; 0xff
   c:   e7931101ldr r1, [r3, r1, lsl #2]
  10:   eafeb   0 open
  14:   andeq   r0, r0, r0

Disassembly of section .rodata:

 CSWTCH.1:
   0:   004aandeq   r0, r0, r10, asr #32
   4:   0003andeq   r0, r0, r3
   8:   004bandeq   r0, r0, r11, asr #32
//- end of ASM 

The jump table should contain 4 entries. It is only 3 entry wide.
There's no entry for 'case OM_READ'.
Nevertheless, the compiler shifts the index (sub r1, r1, #1), as if the
switch() value were starting from 1, rather than from 0.
When switch (OM_READ) is executed, r1 is decremented from 0 to 0x,
then masked to a single byte 0xff, following the ARM AAPCS variable-width
enumerated types.
This new index is used to access the jump table, but index 0xff is out of the 
jump table.

Notes:
 * If OpenMode enum is forced to start from 1 -rather than 0-, the emitted code
   is valid (4-entry jump table):
 OM_READ = 1
 * If OpenMode enum is simply added another entry, the emitted code changes 
   and becomes valid (4-entry jump table):
 OM_READWRITE_CREATE,
 OM_DUMMY,
 * If mode is not initialized to a default value, but mode is assigned the
   same value (0) within a 'default', emitted code is valid:
 int mode;
 //
 default: mode = 0; break;

The compiler has been built with the following options:
$ arm-eabi-gcc -c -O2 -mcpu=arm926ej-s -fno-rtti -fno-exceptions -o fopen.o
fopen.cxx -Wtype-limits -v
Using built-in specs.
COLLECT_GCC=arm-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/local/homebrew/Cellar/gcc-arm-ecos/4.5.0/libexec/gcc/arm-eabi/4.5.0/lto-wrapper
Target: arm-eabi
Configured with: ../configure

[Bug middle-end/44329] New: vectorization loss in gas_dyn

2010-05-29 Thread howarth at nitro dot med dot uc dot edu
Currently gcc trunk is showing significant loss of vectorization at r160038 for
the gas_dyn.f90 benchmark...

bash-3.2$ gfortran -O3 -ffast-math -ftree-vectorizer-verbose=2 gas_dyn.f90 
gcc46.txt
bash-3.2$ grep LOOP VECTORIZED gcc46.txt | wc
  29 1161177

compared to...

bash-3.2$ gfortran -O3 -ffast-math -ftree-vectorizer-verbose=2 gas_dyn.f90 
gcc46.txt
bash-3.2$ grep LOOP VECTORIZED gcc46.txt | wc
  41 1641666

at r159941.


-- 
   Summary: vectorization loss in gas_dyn
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: howarth at nitro dot med dot uc dot edu
 GCC build triplet: x86_64-apple-darwin10
  GCC host triplet: x86_64-apple-darwin10
GCC target triplet: x86_64-apple-darwin10


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



[Bug middle-end/44329] vectorization loss in gas_dyn

2010-05-29 Thread howarth at nitro dot med dot uc dot edu


--- Comment #1 from howarth at nitro dot med dot uc dot edu  2010-05-30 
00:34 ---
Sorry for the noise. Wrong version of gcc was being executed.


-- 

howarth at nitro dot med dot uc dot edu changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||WORKSFORME


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



[Bug objc/44140] ObjC lto/whopr fails

2010-05-29 Thread iains at gcc dot gnu dot org


--- Comment #10 from iains at gcc dot gnu dot org  2010-05-30 00:56 ---
Created an attachment (id=20775)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20775action=view)
with -lto 

the code @ comment # compiled with -flto -dA -fverbose-asm


-- 


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



[Bug objc/44140] ObjC lto/whopr fails

2010-05-29 Thread iains at gcc dot gnu dot org


--- Comment #11 from iains at gcc dot gnu dot org  2010-05-30 00:57 ---
Created an attachment (id=20776)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20776action=view)
without lto

code from comment #5 compiled with -dA -fverbose-asm


-- 


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



[Bug objc/44140] ObjC lto/whopr fails

2010-05-29 Thread iains at gcc dot gnu dot org


--- Comment #12 from iains at gcc dot gnu dot org  2010-05-30 01:00 ---
OK, so I've patch obj-act.c to remove the two cases where ASM_ was called. 
The test code compiles and runs without -flto and produces the errors as per
comment #9 when -flto is given.

The required content is present, it's just that the elements have become
disconnected - it looks like the reference has been updated, but not what it
refers too.  


-- 


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



[Bug fortran/44292] [libgfortran ABI breakage] Increase internal size of RECL= of the OPEN statement

2010-05-29 Thread jvdelisle at gcc dot gnu dot org


--- Comment #2 from jvdelisle at gcc dot gnu dot org  2010-05-30 05:38 
---
I would like to work this one.


-- 

jvdelisle at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |jvdelisle at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2010-05-29 22:20:03 |2010-05-30 05:38:00
   date||


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



[Bug target/44290] [4.5 Regression] __naked attribute is broken

2010-05-29 Thread raj dot khem at gmail dot com


--- Comment #19 from raj dot khem at gmail dot com  2010-05-30 05:58 ---
(In reply to comment #18)
 Created an attachment (id=20773)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20773action=view) [edit]
 linux kernel workaround for attribute naked breakage
 
 This patch makes the Linux kernel add noinline and noclone attributes to
 functions declared __naked.  This allows gcc-4.5 to build a working 2.6.34
 Linux kernel for my mach-iop32x/n2100 ARM box.
 
 Khem: can you check if this kernel-side workaround fixes your problem?

I have tried using __noclone__ a couple of days ago to workaround the problem
//static void __attribute__((__naked__, __noinline__, __noclone__,
__no_instrument_function__))

static void __attribute__((__naked__, __no_instrument_function__))
v4wb_copy_user_page(void *kto, const void *kfrom)

But my gcc seems to ignore it and its generating same code for both with Os and
O2 for both
above cases. Hence did not solve my issue.
I am using snapshot of 4.5 branch from May 20

 
 Eventually I'd like the kernel to not use __naked, but that is non-trivial. 
 This fix should work now and be easily backportable to older kernels.
 


-- 


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