[Bug debug/48333] -fcompare-debug failure (length) - memmove x __builtin_memmove

2011-03-31 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48333

--- Comment #3 from Alexandre Oliva aoliva at gcc dot gnu.org 2011-03-31 
06:12:22 UTC ---
Created attachment 23832
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=23832
Patch that fixes the bug

It's a garbage collection issue: we're supposed to share mem_attrs involving
__builtin and non-__builtin functions, and we do, unless GC manages to discard
mem_attrs at precisely the worst possible moment, and does so at only one of
the compilations, and we're unlucky to end up inserting a different one next
time it is required.

A more general solution would amount to checking for builtins at dump time, and
discarding the __builtin prefix or noting it as optional or somesuch, but I'm
testing this simpler and hopefully effective solution instead.


[Bug libstdc++/48382] New: ctype_noninline.h should not be installed

2011-03-31 Thread ian at airs dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48382

   Summary: ctype_noninline.h should not be installed
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: i...@airs.com


Currently libstdc++-v3 installs the header file ctype_noninline.h.  No other
header file #include's it.  The comment after the license boilerplate says
This is an internal header file, included by other library headers.  Do not
attempt to use it directly.  The header file exists to be included by
src/ctype.cc.

I think that in include/Makefile.am ctype_nonline.h should move from
host_headers to host_headers_noinst.


[Bug c++/48075] [trans-mem] infinite loop when compiling

2011-03-31 Thread patrick.marlier at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48075

--- Comment #2 from Patrick Marlier patrick.marlier at gmail dot com 
2011-03-31 07:26:24 UTC ---
Created attachment 23833
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=23833
same testcase but with errors removed

(In reply to comment #1)
 Can you reduce this test case again without the errors?
Attached the same testcase but with errors removed.

Patrick Marlier.


[Bug middle-end/48381] [4.7 Regression] internal compiler error: in check_allocation, at ira.c:2094

2011-03-31 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48381

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.03.31 07:51:54
 CC||jakub at gcc dot gnu.org,
   ||vmakarov at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #1 from Jakub Jelinek jakub at gcc dot gnu.org 2011-03-31 
07:51:54 UTC ---
Confirmed.

Slightly reduced testcase (again, -Os -m32):

struct S { int s; } t;

int baz (void);
void fn (int, unsigned, int, unsigned, char);

static char
foo (signed x, unsigned y)
{
  return x  0 || y = 32 ? 1 : x  y;
}

long long
bar (long long x, long y)
{
  return y  0 ? 1LL : x - y;
}

void
test (int x, unsigned y, unsigned z, char w)
{
  unsigned v[2];
  fn (w || baz (), y, t.s, y, foo (bar (z, w) = v[0], x));
}


[Bug target/44643] ice in c-typeck.c

2011-03-31 Thread lts-rudolph at gmx dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44643

Klaus Rudolph lts-rudolph at gmx dot de changed:

   What|Removed |Added

 CC||lts-rudolph at gmx dot de

--- Comment #7 from Klaus Rudolph lts-rudolph at gmx dot de 2011-03-31 
07:53:25 UTC ---
The problem occurs also with avr-libc-1.7.1 with gcc 4.6.0 release.


[Bug target/48380] ICE in postreload.c while building trunk

2011-03-31 Thread revital.eres at linaro dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48380

--- Comment #1 from revital.eres at linaro dot org 2011-03-31 08:38:40 UTC ---
Created attachment 23834
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=23834
Test inspired from libgcov.c

Command to run the test on ARM machine:

/home/revitale/mainline/build/./gcc/xgcc -B/home/revitale/mainline/build/./gcc/
 -g -O2 -O2  -g -O2 k13.c


[Bug preprocessor/48383] New: Line continuations handled incorrectly in 4.5 and above

2011-03-31 Thread dg at cowlark dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48383

   Summary: Line continuations handled incorrectly in 4.5 and
above
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: preprocessor
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: d...@cowlark.com


Given the following test file:

foo \
bar

...then if I preprocess it with gcc 4.4 (using gcc -E), I get this:

foo bar

...but if I preprocess it with gcc 4.5 or 4.6, I get this:

foo
 bar

This would appear to me to violate 5.1.1.2.1.2 of the C99 draft, which states:

 Each instance of a backslash character (\) immediately followed by a new-line
 character is deleted, splicing physical source lines to form logical source
 lines.

Given that the following test file:

foo\
bar

...always preprocesses to this:

foobar

...then I suspect that what we've got here is an optimisation to keep line
number information correct on the 'bar' token; the reasoning would presumably
be that since C (and C++) treats newlines like all other whitespace, it makes
no difference whether the 'bar' token is on the same line or a new line.
Unfortunately, I believe the spec doesn't allow this behaviour.

(This is actually biting us because we're using cpp to preprocess files before
passing them to a perl script, and are relying on cpp to glue line
continuations together. As of gcc 4.5, this is no longer happening.)


[Bug preprocessor/41445] Debug information is wrong with and without --save-temps.

2011-03-31 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41445

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 CC||dg at cowlark dot com

--- Comment #7 from Jakub Jelinek jakub at gcc dot gnu.org 2011-03-31 
09:12:03 UTC ---
*** Bug 48383 has been marked as a duplicate of this bug. ***


[Bug preprocessor/48383] Line continuations handled incorrectly in 4.5 and above

2011-03-31 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48383

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||jakub at gcc dot gnu.org
 Resolution||DUPLICATE

--- Comment #1 from Jakub Jelinek jakub at gcc dot gnu.org 2011-03-31 
09:12:03 UTC ---
The C standard doesn't mandate how gcc -E output should look like, and you are
misusing a C preprocessor for purposes it wasn't meant to.
Just use gcc -E -P, then gcc doesn't emit line notes nor tries to provide
accurate line locations of tokens.

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


[Bug preprocessor/48383] Line continuations handled incorrectly in 4.5 and above

2011-03-31 Thread dg at cowlark dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48383

--- Comment #2 from David Given dg at cowlark dot com 2011-03-31 09:38:58 UTC 
---
Adding -P does fix our immediate problem; thanks.

I would note that there's no indication in the documentation as to why this
option would help; I would never have known to use it if you hadn't told me!
Some discussion of the issue there might be useful (and also in the
'Preprocessor Output Format' section).


[Bug c++/48372] Missed error for redundant default argument on template.

2011-03-31 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48372

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||accepts-invalid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.03.31 09:46:46
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther rguenth at gcc dot gnu.org 2011-03-31 
09:46:46 UTC ---
Confirmed.


[Bug middle-end/48377] [4.6 regression] miscompilation at -O3

2011-03-31 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48377

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2011.03.31 09:52:51
   Target Milestone|--- |4.6.1
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther rguenth at gcc dot gnu.org 2011-03-31 
09:52:51 UTC ---
Does the issue reproduce without using -ftree-loop-linear?  In general try
to avoid loads of -f switches and stick to basic (and well tested) -Ox
options.  Does it fail with just -O3?


[Bug other/48378] gcc 4.6.0 fails to build from source

2011-03-31 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48378

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2011.03.31 09:54:09
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther rguenth at gcc dot gnu.org 2011-03-31 
09:54:09 UTC ---
Do not build in the source directory.


[Bug middle-end/48377] [4.6 regression] miscompilation at -O3

2011-03-31 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48377

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org
   Severity|critical|normal


[Bug lto/48384] New: lto, linker-plugin and optimization clutter the stack trace

2011-03-31 Thread vincenzo.innocente at cern dot ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48384

   Summary: lto, linker-plugin and optimization clutter the stack
trace
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: lto
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: vincenzo.innoce...@cern.ch


Created attachment 23835
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=23835
an header file, three compilation units, a script to source that will produce
several shared libraries and executables

I'm testing lto and the linker-plugin within shared libraries.
Results using hidden visibility are very encouraging. Unfortunately the
combination of even mild optimization (O2) and -flto -fuse-linker-plugin seems
to clutter the stack-trace. This can be easily
shown in gdb. It makes also instrumentation tools, that rely on stack trace, to
either crash or produce wrong results.

I'm using 
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.6.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --enable-gold=yes --enable-lto --with-fpmath=avx
Thread model: posix
gcc version 4.6.1 20110325 (prerelease) (GCC) 

GNU gold (GNU Binutils 2.21) 1.10

Linux vinavx0.cern.ch 2.6.32-71.14.1.el6.x86_64 #1 SMP Thu Jan 13 12:03:40 CET
2011 x86_64 x86_64 x86_64 GNU/Linux

glibc.x86_64   2.12-1.7.el6_0.4  
GNU gdb (GDB) Red Hat Enterprise Linux (7.1-29.el6_0.1)


In  the attachment there are the four  files of my simple test (a long loop and
a seg-fault)
and a script that builds various versions
just compare
g++ -g -DHIDDEN go.cc foo.cc -flto -fuse-linker-plugin -fPIC -shared -o
libfoo_hltog.so
g++ -g -DHIDDEN main.cc -flto -fuse-linker-plugin -L./ -lfoo_hltog -o t_hltog
with
g++ -O2 -g -DHIDDEN go.cc foo.cc -flto -fuse-linker-plugin -fPIC -shared -o
libfoo_hltog2.so
g++ -O2 -g -DHIDDEN main.cc -flto -fuse-linker-plugin -L./ -lfoo_hltog2 -o
t_hltog2

the first looks ok,
(the segmentation fault deferencing a zero pointer is intentional)
the latter in gdb will produce
(gdb) run
Starting program: /afs/cern.ch/user/i/innocent/public/ctest/lto/t_hltog2 
Program received signal SIGSEGV, Segmentation fault.
go (j=Cannot access memory at address 0x0
) at go.cc:5
5  j+= foo(h);
Missing separate debuginfos, use: debuginfo-install
glibc-2.12-1.7.el6_0.4.x86_64
(gdb) where
#0  go (j=Cannot access memory at address 0x0
) at go.cc:5
#1  0x03e8 in ?? ()
#2  0x42c84232ee1f in ?? ()
#3  0x in ?? ()
(gdb) run 2
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /afs/cern.ch/user/i/innocent/public/ctest/lto/t_hltog2 2
^C
Program received signal SIGINT, Interrupt.
0x003ff6207ebd in __ieee754_asin () from /lib64/libm.so.6
(gdb) where
#0  0x003ff6207ebd in __ieee754_asin () from /lib64/libm.so.6
#1  0x003ff6224842 in asin () from /lib64/libm.so.6
#2  0x77ffb6aa in bar (j=2001, h=0x0) at foo.cc:14
#3  go (j=2001, h=0x0) at go.cc:4
#4  0x00989680 in ?? ()
#5  0x3f803f81 in ?? ()
#6  0x in ?? ()
(gdb) 


in more complex applications with multiple shared libraries things gets much
more confused with ??
all over the srack-trace


[Bug lto/48246] ICE in lto_wpa_write_files

2011-03-31 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48246

--- Comment #4 from Richard Guenther rguenth at gcc dot gnu.org 2011-03-31 
10:00:48 UTC ---
Author: rguenth
Date: Thu Mar 31 10:00:44 2011
New Revision: 171774

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=171774
Log:
2011-03-31  Richard Guenther  rguent...@suse.de

PR lto/48246
* lto.c (lto_wpa_write_files): Disable assert for non-empty
partitions when checking is not enabled.

Modified:
branches/gcc-4_6-branch/gcc/lto/ChangeLog
branches/gcc-4_6-branch/gcc/lto/lto.c


[Bug lto/48246] ICE in lto_wpa_write_files

2011-03-31 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48246

--- Comment #5 from Richard Guenther rguenth at gcc dot gnu.org 2011-03-31 
10:02:03 UTC ---
Author: rguenth
Date: Thu Mar 31 10:02:00 2011
New Revision: 171775

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=171775
Log:
2011-03-31  Richard Guenther  rguent...@suse.de

PR lto/48246
* lto.c (lto_wpa_write_files): Disable assert for non-empty
partitions when checking is not enabled.

Modified:
trunk/gcc/lto/ChangeLog
trunk/gcc/lto/lto.c


[Bug lto/48246] ICE in lto_wpa_write_files

2011-03-31 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48246

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||ice-checking

--- Comment #6 from Richard Guenther rguenth at gcc dot gnu.org 2011-03-31 
10:02:29 UTC ---
Done.


[Bug c++/48379] -Wdouble-promotion warns for promotion by varargs

2011-03-31 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48379

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||diagnostic
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.03.31 10:04:48
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther rguenth at gcc dot gnu.org 2011-03-31 
10:04:48 UTC ---
I think it's working as designed.  Eventually some separate control over
whether
varargs should be warned for is useful.


[Bug fortran/48360] [4.6/4.7 Regression] ICE on array assignment statement with allocatable LHS

2011-03-31 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48360

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||jakub at gcc dot gnu.org


[Bug lto/48384] lto, linker-plugin and optimization clutter the stack trace

2011-03-31 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48384

--- Comment #1 from Richard Guenther rguenth at gcc dot gnu.org 2011-03-31 
10:28:07 UTC ---
Hm.  I get

 LD_LIBRARY_PATH=. gdb ./t_hltog
GNU gdb (GDB) SUSE (7.2.50.20110206-67.1)
...
Program received signal SIGSEGV, Segmentation fault.
0x77ff87eb in foo (h=0x0) at foo.cc:6
6 return *h +1;
(gdb) bt
#0  0x77ff87eb in foo (h=0x0) at foo.cc:6
#1  0x77ff8709 in go (j=2001, h=0x0) at go.cc:5
#2  0x0040063d in main (argc=1) at main.cc:7

 LD_LIBRARY_PATH=. gdb ./t_hltog2
GNU gdb (GDB) SUSE (7.2.50.20110206-67.1)
...
Program received signal SIGSEGV, Segmentation fault.
go (j=Cannot access memory at address 0x0
) at go.cc:5
5 j+= foo(h);
(gdb) bt
#0  go (j=Cannot access memory at address 0x0
) at go.cc:5
#1  0x0040062d in main (argc=optimized out) at main.cc:7

 LD_LIBRARY_PATH=. gdb ./t_hlto
GNU gdb (GDB) SUSE (7.2.50.20110206-67.1)
...
Program received signal SIGSEGV, Segmentation fault.
0x77ff874b in go(int, int const*) () from ./libfoo_hlto.so
(gdb) bt
#0  0x77ff874b in go(int, int const*) () from ./libfoo_hlto.so
#1  0x0040062d in main ()


which looks reasonable.

As I can't reproduce the issue at hand I didn't try to investigate
what debuginfo parts may be off.  The assembly of the shared library
shows that foo is inlined into go which appearantly didn't happen for
you?  I don't have any foo symbol in the shared library.  So maybe
gdb is confused by bogus debug information about inlines.


[Bug libstdc++/48382] ctype_noninline.h should not be installed

2011-03-31 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48382

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 CC||paolo.carlini at oracle dot
   ||com

--- Comment #1 from Paolo Carlini paolo.carlini at oracle dot com 2011-03-31 
10:35:21 UTC ---
The solution doesn't seem absolutely trivial: simply moving it breaks the build
because src/ctype.cc looks for it as bits/ctype_noninline.h


[Bug other/48378] gcc 4.6.0 fails to build from source

2011-03-31 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48378

--- Comment #2 from Jonathan Wakely redi at gcc dot gnu.org 2011-03-31 
10:38:30 UTC ---
this is documented at
http://gcc.gnu.org/install/configure.html
and
http://gcc.gnu.org/wiki/FAQ#configure


[Bug lto/48384] lto, linker-plugin and optimization clutter the stack trace

2011-03-31 Thread vincenzo.innocente at cern dot ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48384

--- Comment #2 from vincenzo Innocente vincenzo.innocente at cern dot ch 
2011-03-31 10:39:36 UTC ---
Thanks,
at least on some system it seems to behave correclty.
I had to rebuild binutil to enable the plugin and something may have gone wrong
are you using standard bfd  ld or  gold?

vincenzo

On 31 Mar, 2011, at 12:28 PM, rguenth at gcc dot gnu.org wrote:

 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48384
 
 --- Comment #1 from Richard Guenther rguenth at gcc dot gnu.org 2011-03-31 
 10:28:07 UTC ---
 Hm.  I get
 
 LD_LIBRARY_PATH=. gdb ./t_hltog
 GNU gdb (GDB) SUSE (7.2.50.20110206-67.1)
 ...
 Program received signal SIGSEGV, Segmentation fault.
 0x77ff87eb in foo (h=0x0) at foo.cc:6
 6 return *h +1;
 (gdb) bt
 #0  0x77ff87eb in foo (h=0x0) at foo.cc:6
 #1  0x77ff8709 in go (j=2001, h=0x0) at go.cc:5
 #2  0x0040063d in main (argc=1) at main.cc:7
 
 LD_LIBRARY_PATH=. gdb ./t_hltog2
 GNU gdb (GDB) SUSE (7.2.50.20110206-67.1)
 ...
 Program received signal SIGSEGV, Segmentation fault.
 go (j=Cannot access memory at address 0x0
 ) at go.cc:5
 5 j+= foo(h);
 (gdb) bt
 #0  go (j=Cannot access memory at address 0x0
 ) at go.cc:5
 #1  0x0040062d in main (argc=optimized out) at main.cc:7
 
 LD_LIBRARY_PATH=. gdb ./t_hlto
 GNU gdb (GDB) SUSE (7.2.50.20110206-67.1)
 ...
 Program received signal SIGSEGV, Segmentation fault.
 0x77ff874b in go(int, int const*) () from ./libfoo_hlto.so
 (gdb) bt
 #0  0x77ff874b in go(int, int const*) () from ./libfoo_hlto.so
 #1  0x0040062d in main ()
 
 
 which looks reasonable.
 
 As I can't reproduce the issue at hand I didn't try to investigate
 what debuginfo parts may be off.  The assembly of the shared library
 shows that foo is inlined into go which appearantly didn't happen for
 you?  I don't have any foo symbol in the shared library.  So maybe
 gdb is confused by bogus debug information about inlines.
 
 -- 
 Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
 --- You are receiving this mail because: ---
 You reported the bug.

--
Il est bon de suivre sa pente, pourvu que ce soit en montant. 
A.G.
http://www.flickr.com/photos/vin60/1320965757/


[Bug lto/48384] lto, linker-plugin and optimization clutter the stack trace

2011-03-31 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48384

--- Comment #3 from Richard Guenther rguenth at gcc dot gnu.org 2011-03-31 
10:43:49 UTC ---
(In reply to comment #2)
 Thanks,
 at least on some system it seems to behave correclty.
 I had to rebuild binutil to enable the plugin and something may have gone 
 wrong
 are you using standard bfd  ld or  gold?

I'm using standard bfd ld, version 2.21.

Richard.


[Bug preprocessor/48383] Line continuations handled incorrectly in 4.5 and above

2011-03-31 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48383

--- Comment #3 from Jonathan Wakely redi at gcc dot gnu.org 2011-03-31 
10:44:08 UTC ---
http://gcc.gnu.org/wiki/FAQ#cpp_continuation_discarded


[Bug lto/48384] lto, linker-plugin and optimization clutter the stack trace

2011-03-31 Thread vincenzo.innocente at cern dot ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48384

--- Comment #4 from vincenzo Innocente vincenzo.innocente at cern dot ch 
2011-03-31 11:05:47 UTC ---
its' a gold effect!
with 
ld -v
GNU ld (GNU Binutils) 2.21
things are fine
(gdb) run
Starting program: /afs/cern.ch/user/i/innocent/public/ctest/lto/t_hlto 
Program received signal SIGSEGV, Segmentation fault.
0x77dfc78d in go(int, int const*) () from ./libfoo_hlto.so
Missing separate debuginfos, use: debuginfo-install
glibc-2.12-1.7.el6_0.4.x86_64
(gdb) where
#0  0x77dfc78d in go(int, int const*) () from ./libfoo_hlto.so
#1  0x0040050d in main ()

I will stick to  bfd ld for the time being. 
not sure on which side should be 
gold + gcc-lto-plugin 
debug.
gold is written in c++ which may mean that  bootstrap in the installation is
needed

thanks for the fast feed back,

vincenzo

On 31 Mar, 2011, at 12:43 PM, rguenth at gcc dot gnu.org wrote:

 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48384
 
 --- Comment #3 from Richard Guenther rguenth at gcc dot gnu.org 2011-03-31 
 10:43:49 UTC ---
 (In reply to comment #2)
 Thanks,
 at least on some system it seems to behave correclty.
 I had to rebuild binutil to enable the plugin and something may have gone 
 wrong
 are you using standard bfd  ld or  gold?
 
 I'm using standard bfd ld, version 2.21.
 
 Richard.
 
 -- 
 Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
 --- You are receiving this mail because: ---
 You reported the bug.


[Bug target/48142] [4.6/4.7 Regression] miscompilation with -Os -mpreferred-stack-boundary=5 -fstack-check

2011-03-31 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48142

--- Comment #4 from Eric Botcazou ebotcazou at gcc dot gnu.org 2011-03-31 
11:11:03 UTC ---
Author: ebotcazou
Date: Thu Mar 31 11:10:59 2011
New Revision: 171777

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=171777
Log:
PR target/48142
* config/i386/i386.c (ix86_adjust_stack_and_probe): Differentiate
frame-related from frame-unrelated adjustments to the stack pointer.

Added:
trunk/gcc/testsuite/g++.dg/other/i386-9.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/testsuite/ChangeLog


[Bug target/48142] [4.6/4.7 Regression] miscompilation with -Os -mpreferred-stack-boundary=5 -fstack-check

2011-03-31 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48142

--- Comment #5 from Eric Botcazou ebotcazou at gcc dot gnu.org 2011-03-31 
11:14:44 UTC ---
Author: ebotcazou
Date: Thu Mar 31 11:14:41 2011
New Revision: 171778

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=171778
Log:
PR target/48142
* config/i386/i386.c (ix86_adjust_stack_and_probe): Differentiate
frame-related from frame-unrelated adjustments to the stack pointer.

Added:
branches/gcc-4_6-branch/gcc/testsuite/g++.dg/other/i386-9.C
  - copied unchanged from r171777,
trunk/gcc/testsuite/g++.dg/other/i386-9.C
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/config/i386/i386.c
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog


[Bug target/48142] [4.6/4.7 Regression] miscompilation with -Os -mpreferred-stack-boundary=5 -fstack-check

2011-03-31 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48142

Eric Botcazou ebotcazou at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #6 from Eric Botcazou ebotcazou at gcc dot gnu.org 2011-03-31 
11:16:15 UTC ---
.


[Bug rtl-optimization/48143] [4.6 Regression] ICE: in reset_sched_cycles_in_current_ebb, at sel-sched.c:7114 with custom flags

2011-03-31 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48143

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org
  Known to work||4.7.0
Summary|[4.6/4.7 Regression] ICE:   |[4.6 Regression] ICE: in
   |in  |reset_sched_cycles_in_curre
   |reset_sched_cycles_in_curre |nt_ebb, at sel-sched.c:7114
   |nt_ebb, at sel-sched.c:7114 |with custom flags
   |with custom flags   |
  Known to fail|4.7.0   |

--- Comment #7 from Jakub Jelinek jakub at gcc dot gnu.org 2011-03-31 
11:37:03 UTC ---
Do you plan to backport this to 4.6 branch?


[Bug rtl-optimization/48143] [4.6 Regression] ICE: in reset_sched_cycles_in_current_ebb, at sel-sched.c:7114 with custom flags

2011-03-31 Thread abel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48143

--- Comment #8 from Andrey Belevantsev abel at gcc dot gnu.org 2011-03-31 
11:44:46 UTC ---
(In reply to comment #7)
 Do you plan to backport this to 4.6 branch?
Sure, I was just waiting for 4.6.0 to take off.


[Bug libstdc++/48382] ctype_noninline.h should not be installed

2011-03-31 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48382

--- Comment #2 from Paolo Carlini paolo.carlini at oracle dot com 2011-03-31 
12:01:36 UTC ---
It looks like the issue boils down to implementing the existing XXX comment in
ctype.cc, seems doable:

  // XXX At some point, just rename this file to ctype_configure_char.cc
  // and compile it as a separate file instead of including it here.
  // Platform-specific initialization code for ctype tables.
#include bits/ctype_noninline.h


[Bug target/47109] m68k-netbsdelf: collect2 build fails with undefined reference to m68k_cpu_flags

2011-03-31 Thread jsm28 at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47109

--- Comment #5 from Joseph S. Myers jsm28 at gcc dot gnu.org 2011-03-31 
12:13:24 UTC ---
Author: jsm28
Date: Thu Mar 31 12:13:13 2011
New Revision: 171779

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=171779
Log:
PR target/47109
* doc/tm.texi.in (TARGET_VERSION): Remove.
* doc/tm.texi: Regenerate.
* system.h (TARGET_VERSION, MACHINE_TYPE): Poison.
* collect2.c (main): Don't use TARGET_VERSION.
* mips-tdump.c (main): Don't use TARGET_VERSION.
* mips-tfile.c (main): Don't use TARGET_VERSION.
* config.gcc (powerpc-wrs-vxworksae): Don't use
rs6000/vxworksae.h.
* config/rs6000/vxworksae.h: Remove.
* config/alpha/alpha.h (TARGET_VERSION): Remove.
* config/alpha/freebsd.h (TARGET_VERSION): Remove.
* config/alpha/linux-elf.h (TARGET_VERSION): Remove.
* config/alpha/netbsd.h (TARGET_VERSION): Remove.
* config/alpha/vms.h (TARGET_NAME, TARGET_VERSION): Remove.
* config/arm/arm.h (TARGET_VERSION): Remove.
* config/arm/coff.h (TARGET_VERSION): Remove.
* config/arm/ecos-elf.h (TARGET_VERSION): Remove.
* config/arm/elf.h (TARGET_VERSION): Remove.
* config/arm/freebsd.h (TARGET_VERSION): Remove.
* config/arm/linux-elf.h (TARGET_VERSION): Remove.
* config/arm/netbsd-elf.h (TARGET_VERSION): Remove.
* config/arm/pe.h (TARGET_VERSION): Remove.
* config/arm/rtems-elf.h (TARGET_VERSION): Remove.
* config/arm/semi.h (TARGET_VERSION): Remove.
* config/arm/uclinux-elf.h (TARGET_VERSION): Remove.
* config/arm/unknown-elf.h (TARGET_VERSION): Remove.
* config/arm/vxworks.h (TARGET_VERSION): Remove.
* config/avr/avr.h (TARGET_VERSION): Remove.
* config/bfin/bfin.h (TARGET_VERSION): Remove.
* config/fr30/fr30.h (TARGET_VERSION): Remove.
* config/frv/frv.h (TARGET_VERSION): Remove.
* config/h8300/h8300.h (TARGET_VERSION): Remove.
* config/i386/cygwin.h (TARGET_VERSION): Remove.
* config/i386/darwin.h (TARGET_VERSION): Remove.
* config/i386/darwin64.h (TARGET_VERSION): Remove.
* config/i386/djgpp.h (TARGET_VERSION): Remove.
* config/i386/freebsd.h (TARGET_VERSION): Remove.
* config/i386/freebsd64.h (TARGET_VERSION): Remove.
* config/i386/gnu.h (TARGET_VERSION): Remove.
* config/i386/i386-interix.h (TARGET_VERSION): Remove.
* config/i386/i386elf.h (TARGET_VERSION): Remove.
* config/i386/linux.h (TARGET_VERSION): Remove.
* config/i386/linux64.h (TARGET_VERSION): Remove.
* config/i386/lynx.h (TARGET_VERSION): Remove.
* config/i386/mingw32.h (TARGET_VERSION): Remove.
* config/i386/netbsd-elf.h (TARGET_VERSION): Remove.
* config/i386/netbsd64.h (TARGET_VERSION): Remove.
* config/i386/netware.h (TARGET_VERSION): Remove.
* config/i386/nto.h (TARGET_VERSION): Remove.
* config/i386/openbsd.h (TARGET_VERSION): Remove.
* config/i386/vxworks.h (TARGET_VERSION): Remove.
* config/ia64/elf.h (TARGET_VERSION): Remove.
* config/ia64/freebsd.h (TARGET_VERSION): Remove.
* config/ia64/hpux.h (TARGET_VERSION): Remove.
* config/ia64/linux.h (TARGET_VERSION): Remove.
* config/ia64/vms.h (TARGET_NAME, TARGET_VERSION): Remove.
* config/iq2000/iq2000.h (IQ2000_VERSION, MACHINE_TYPE,
TARGET_VERSION_INTERNAL, TARGET_VERSION): Remove.
* config/lm32/lm32.h (TARGET_VERSION): Remove.
* config/lm32/uclinux-elf.h (TARGET_VERSION): Remove.
* config/m32c/m32c.h (TARGET_VERSION): Remove.
* config/m32r/linux.h (LINUX_DEFAULT_ELF, TARGET_VERSION): Remove.
* config/m32r/m32r.h (TARGET_VERSION): Remove.
* config/m68k/linux.h (TARGET_VERSION): Remove.
* config/m68k/m68k.h (TARGET_VERSION): Remove.
* config/m68k/netbsd-elf.h (TARGET_VERSION): Remove.
* config/m68k/uclinux.h (TARGET_VERSION): Remove.
* config/mcore/mcore-elf.h (TARGET_VERSION): Remove.
* config/mep/mep.h (TARGET_VERSION): Remove.
* config/microblaze/microblaze.h (MICROBLAZE_VERSION,
MACHINE_TYPE, TARGET_VERSION_INTERNAL, TARGET_VERSION): Remove.
* config/mips/iris6.h (MACHINE_TYPE): Remove.
* config/mips/linux.h (TARGET_VERSION): Remove.
* config/mips/netbsd.h (MACHINE_TYPE): Remove.
* config/mips/vxworks.h (TARGET_VERSION): Remove.
* config/mmix/mmix.h (TARGET_VERSION): Remove.
* config/mn10300/linux.h (TARGET_VERSION): Remove.
* config/mn10300/mn10300.h (TARGET_VERSION): Remove.
* config/pa/pa.h (TARGET_VERSION): Remove.
* config/pdp11/pdp11.h (TARGET_VERSION): Remove.
* config/picochip/picochip.h (TARGET_VERSION): Remove.
* config/rs6000/aix.h (TARGET_VERSION): Remove.
* config/rs6000/darwin.h (TARGET_VERSION): Remove.
* config/rs6000/darwin64.h (TARGET_VERSION): Remove.
* config/rs6000/eabi.h (TARGET_VERSION): Remove.
* config/rs6000/eabialtivec.h (TARGET_VERSION): Remove.
* config/rs6000/eabisim.h (TARGET_VERSION): Remove.
* config/rs6000/eabispe.h (TARGET_VERSION): Remove.
* 

[Bug target/47109] m68k-netbsdelf: collect2 build fails with undefined reference to m68k_cpu_flags

2011-03-31 Thread jsm28 at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47109

Joseph S. Myers jsm28 at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #6 from Joseph S. Myers jsm28 at gcc dot gnu.org 2011-03-31 
12:14:43 UTC ---
Fixed for 4.7.


[Bug c++/48313] [C++0x] std::bind with template function

2011-03-31 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48313

--- Comment #10 from Jonathan Wakely redi at gcc dot gnu.org 2011-03-31 
12:40:24 UTC ---
Thanks for the fix, Jason, I've just encountered the bug myself using
boost::thread

I expect others will to, so for the benefit of search engines, the error is

post_event_test.cc:130:47: error: cannot bind 'void()' lvalue to 'void ()()'
/home/jwakely/src/boost/boost_1_45_0/boost/thread/detail/thread.hpp:167:9:
error:   initializing argument 1 of 'boost::thread::thread(F) [with F =
void()]'


[Bug fortran/48352] [4.7 Regression] segfault in fortran/frontend-passes.c

2011-03-31 Thread jvdelisle at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48352

--- Comment #3 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-03-31 
12:54:26 UTC ---
The regression is caused by r171207.


[Bug c/48385] New: x86-64: Tail call recursion optimization with -mcmodel=large can generate invalid assembly (immediate operand illegal with absolute jump)

2011-03-31 Thread martin at decky dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48385

   Summary: x86-64: Tail call recursion optimization with
-mcmodel=large can generate invalid assembly
(immediate operand illegal with absolute jump)
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: mar...@decky.cz


Created attachment 23836
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=23836
Compiler result using -save-temps

When using -mcmodel=large and -O3, a tail call to an extern function can
generate an invalid assembly like in the following example:

jmp *$memsetb

The correct assembly output should be perhaps:

jmp *memsetb

The problem can be worked around by adding the -fno-optimize-sibling-calls
option to the compiler command line.


Output of /usr/local/cross/amd64/bin/amd64-linux-gnu-gcc -v:

Using built-in specs.
COLLECT_GCC=/usr/local/cross/amd64/bin/amd64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/usr/local/cross/amd64/libexec/gcc/amd64-linux-gnu/4.6.0/lto-wrapper
Target: amd64-linux-gnu
Configured with: /root/install/cross/amd64/gcc-4.6.0/configure
--target=amd64-linux-gnu --prefix=/usr/local/cross/amd64
--program-prefix=amd64-linux-gnu- --with-gnu-as --with-gnu-ld --disable-nls
--disable-threads --enable-languages=c,objc,c++,obj-c++ --disable-multilib
--disable-libgcj --without-headers --disable-shared --enable-lto
Thread model: single
gcc version 4.6.0 (GCC)


Command line that triggered the bug:

/usr/local/cross/amd64/bin/amd64-linux-gnu-gcc -DKERNEL -DRELEASE=0.4.3
-DNAME=Sashimi -D__64_BITS__ -D__LE__ -Igeneric/include -O3 -imacros
../config.h -fexec-charset=UTF-8 -fwide-exec-charset=UTF-32LE
-finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc -Wall
-Wextra -Wno-unused-parameter -Wmissing-prototypes
-Werror-implicit-function-declaration -Wwrite-strings -pipe -Werror -m64
-mcmodel=large -mno-red-zone -fno-unwind-tables -fno-omit-frame-pointer
-march=opteron -Itest/  -mno-sse -mno-sse2  -c -o genarch/src/mm/page_pt.o
genarch/src/mm/page_pt.c


Compiler output:

{standard input}: Assembler messages:
{standard input}:722: Error: immediate operand illegal with absolute jump


[Bug c++/48386] New: Cannot declare static function inside another function

2011-03-31 Thread zxfox at mail dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48386

   Summary: Cannot declare static function inside another
function
   Product: gcc
   Version: 4.4.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zx...@mail.ru


Sample code:

struct A {};

struct B 
{
B( A ) {}
};

int main()
{
static B b( A() );
}

On build:

g++ ./1.cpp
./1.cpp: In function ‘int main()’:
./1.cpp:10: error: cannot declare static function inside another function

P.S. my English too ugly, please change summary to some adequate if that is
real bug.


[Bug fortran/48360] [4.6/4.7 Regression] ICE on array assignment statement with allocatable LHS

2011-03-31 Thread jvdelisle at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48360

Jerry DeLisle jvdelisle at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jvdelisle at gcc dot
   ||gnu.org

--- Comment #2 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-03-31 
13:05:01 UTC ---
I am a little suspicious of this:

 static int count_arglist;

+/* Pointer to an array of gfc_expr ** we operate on, plus its size
+   and counter.  */
+
+static gfc_expr ***expr_array;
+static int expr_size, expr_count;


It could be getting walked on or optimized away by the optimizers.  Is there
another way to do this that is less indirect or relies less on static.

Just seems too tricky.  I am not looking further on this one.


[Bug fortran/48352] [4.7 Regression] segfault in fortran/frontend-passes.c

2011-03-31 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48352

--- Comment #4 from Tobias Burnus burnus at gcc dot gnu.org 2011-03-31 
13:05:29 UTC ---
(In reply to comment #3)
 The regression is caused by r171207.

That's http://gcc.gnu.org/ml/gcc-cvs/2011-03/msg00630.html

Author: tkoenig
Date: Mon Mar 21 07:14:42 2011
New Revision: 171207

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=171207
Log:
2010-03-21  Thomas Koenig

PR fortran/22572
[...]


[Bug fortran/48360] [4.6/4.7 Regression] ICE on array assignment statement with allocatable LHS

2011-03-31 Thread jvdelisle at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48360

--- Comment #3 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-03-31 
13:06:06 UTC ---
Disregard 2, wrong PR


[Bug c++/48386] Cannot declare static function inside another function

2011-03-31 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48386

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #1 from Jonathan Wakely redi at gcc dot gnu.org 2011-03-31 
13:10:12 UTC ---
This is not a bug, G++ is correct.

Are you trying to create a static variable?

The rules of C++ say that B b( A() ) is interpreted as a declaration of a
function called b which takes a single parameter and returns B ... and as
the error says, you cannot declare a static variable at function scope.

To declare a static variable you need to do:

  static B b = B( A() );

or

  static B b = A();


[Bug fortran/48352] [4.7 Regression] segfault in fortran/frontend-passes.c

2011-03-31 Thread Joost.VandeVondele at pci dot uzh.ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48352

--- Comment #5 from Joost VandeVondele Joost.VandeVondele at pci dot uzh.ch 
2011-03-31 13:25:27 UTC ---
reduced:

INTEGER, DIMENSION(:), POINTER :: a
DO I=1,MIN(SIZE(a),SIZE(a))
ENDDO
END


[Bug tree-optimization/48387] New: ICE with -floop-flatten

2011-03-31 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48387

   Summary: ICE with -floop-flatten
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: rgue...@gcc.gnu.org
CC: s...@gcc.gnu.org


When compiling gfortran.dg/reassoc_4.f with -O2 -ffast-math -floop-flatten I
get

gcc /abuild/rguenther/trunk-g/gcc/testsuite/gfortran/../../gfortran
-B/abuild/rguenther/trunk-g/gcc/testsuite/gfortran/../../
-B/abuild/rguenther/trunk-g/x86_64-unknown-linux-gnu/./libgfortran/
/space/rguenther/src/svn/trunk/gcc/testsuite/gfortran.dg/reassoc_4.f   -O  -O2
-ffast-math -S  -o reassoc_4.s -floop-flatten
PPL error code -3
PPL::C_Polyhedron::maximize(e, ...):
this-space_dimension() == 11, e.space_dimension() == 12.

thus, PPL aborts on me (that's doubly bad).

No idea if this is a GCC or PPL issue.  This is PPL 0.11 with cloog 0.15.10.


[Bug c++/48386] Cannot declare static function inside another function

2011-03-31 Thread zxfox at mail dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48386

--- Comment #2 from zxfox at mail dot ru 2011-03-31 13:37:05 UTC ---
(In reply to comment #1)
 This is not a bug, G++ is correct.
 
 Are you trying to create a static variable?
 
 The rules of C++ say that B b( A() ) is interpreted as a declaration of a
 function called b which takes a single parameter and returns B 

For:

struct A {};

struct B 
{
B( A ) {}
};

int main()
{
B b( A() );
}

all works, so I have decide that is a bug, sorry for wasted time.


[Bug c++/48386] Cannot declare static function inside another function

2011-03-31 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48386

--- Comment #3 from Jonathan Wakely redi at gcc dot gnu.org 2011-03-31 
13:40:52 UTC ---
(In reply to comment #2)
 all works, so I have decide that is a bug, sorry for wasted time.

It compiles, but it doesn't do what you think: it declares a function b not a
variable.

Try this, which shows that b is not an object of type B:

struct A {};

struct B 
{
B( A ) {}
int f() { return 0; }
};

int main()
{
B b( A() );
return b.f();
}


[Bug tree-optimization/48387] ICE with -floop-flatten

2011-03-31 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48387

--- Comment #1 from Richard Guenther rguenth at gcc dot gnu.org 2011-03-31 
13:49:59 UTC ---
Sebastian - you didn't commit any of the loop flattening testcases when
merging the support to trunk.  Please fix that.


[Bug bootstrap/48148] [4.7 Regression] LTO bootstrap failed with bootstrap-profiled

2011-03-31 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48148

--- Comment #22 from H.J. Lu hjl.tools at gmail dot com 2011-03-31 14:14:08 
UTC ---
Can we apply Jaub's patch to fix bootstrap?


[Bug middle-end/48124] [4.3/4.4/4.5/4.6/4.7 Regression] likely wrong code bug

2011-03-31 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48124

--- Comment #6 from Jakub Jelinek jakub at gcc dot gnu.org 2011-03-31 
14:27:15 UTC ---
Created attachment 23837
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=23837
gcc46-pr48124.patch

WIP patch, completely untested, that attempts to pass down to get_best_mode
exact offset and type.  The patch just attempts to avoid larger modes crossing
into following objects, but for C++0x model it probably should do more than
that.


[Bug libstdc++/48382] ctype_noninline.h should not be installed

2011-03-31 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48382

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011.03.31 14:44:02
 AssignedTo|unassigned at gcc dot   |paolo.carlini at oracle dot
   |gnu.org |com
   Target Milestone|--- |4.7.0
 Ever Confirmed|0   |1


[Bug fortran/48352] [4.7 Regression] segfault in fortran/frontend-passes.c

2011-03-31 Thread jvdelisle at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48352

--- Comment #6 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2011-03-31 
15:01:31 UTC ---
I am a little suspicious of this:

 static int count_arglist;

+/* Pointer to an array of gfc_expr ** we operate on, plus its size
+   and counter.  */
+
+static gfc_expr ***expr_array;
+static int expr_size, expr_count;


It could be getting walked on or optimized away by the optimizers.  Is there
another way to do this that is less indirect or relies less on static.

Just seems too tricky.  I do not have time to go further with this.


[Bug target/16292] Test power.f90 fails on irix6.5 for complex**real

2011-03-31 Thread ro at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16292

--- Comment #9 from Rainer Orth ro at gcc dot gnu.org 2011-03-31 15:02:39 UTC 
---
Author: ro
Date: Thu Mar 31 15:02:33 2011
New Revision: 171784

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=171784
Log:
PR target/16292
* gfortran.dg/g77/cabs.f: Only xfail execution on mips-sgi-irix6*
with -O0.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/g77/cabs.f


[Bug target/16292] Test power.f90 fails on irix6.5 for complex**real

2011-03-31 Thread ro at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16292

--- Comment #10 from Rainer Orth ro at gcc dot gnu.org 2011-03-31 15:05:53 
UTC ---
Author: ro
Date: Thu Mar 31 15:05:47 2011
New Revision: 171785

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=171785
Log:
PR target/16292
* gfortran.dg/g77/cabs.f: Only xfail execution on mips-sgi-irix6*
with -O0.

Modified:
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
branches/gcc-4_6-branch/gcc/testsuite/gfortran.dg/g77/cabs.f


[Bug target/16292] Test power.f90 fails on irix6.5 for complex**real

2011-03-31 Thread ro at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16292

--- Comment #11 from Rainer Orth ro at gcc dot gnu.org 2011-03-31 15:11:28 
UTC ---
Author: ro
Date: Thu Mar 31 15:11:20 2011
New Revision: 171786

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=171786
Log:
PR target/16292
* gfortran.dg/g77/cabs.f: Only xfail execution on mips-sgi-irix6*
with -O0 except with -mabi=32.

Modified:
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
branches/gcc-4_5-branch/gcc/testsuite/gfortran.dg/g77/cabs.f


[Bug c/48388] New: libgcc compilation causes a segfault

2011-03-31 Thread mschamschula at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48388

   Summary: libgcc compilation causes a segfault
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: mschamsch...@gmail.com


When compiling gcc (tested with 4.4.5, 4.5.2 and 4.6.0) under Mac OS X 10.7
(Lion) Prerelease, I get the following error (in libgcc/configure.log):


This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GNU C Runtime Library configure 1.0, which was
generated by GNU Autoconf 2.64.  Invocation command line was

  $ /tmp/gcc-4.6.0/libgcc/configure --cache-file=./config.cache
--enable-multilib --with-system-zlib --with-gmp=/usr/local
--with-mpfr=/usr/local --disable-nls --with-libiconv-prefix=/usr/local
--enable-fully-dynamic-string --prefix=/usr/local/gcc-4.6
--enable-languages=c,c++,fortran,java,objc,obj-c++
--program-transform-name=s$-4.6 --disable-option-checking
--with-target-subdir=x86_64-apple-darwin11 --build=x86_64-apple-darwin11
--host=x86_64-apple-darwin11 --target=x86_64-apple-darwin11
--srcdir=../../../libgcc --disable-intermodule --enable-checking=yes,types
--disable-coverage --enable-languages=c

## - ##
## Platform. ##
## - ##

hostname = Viz.local
uname -m = x86_64
uname -r = 11.0.0
uname -s = Darwin
uname -v = Darwin Kernel Version 11.0.0: Sat Feb 19 19:29:29 PST 2011;
root:xnu-1699.21.15~1/RELEASE_X86_64

/usr/bin/uname -p = i386
/bin/uname -X = unknown

/bin/arch  = unknown
/usr/bin/arch -k   = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo  = Mach kernel version:
 Darwin Kernel Version 11.0.0: Sat Feb 19 19:29:29 PST 2011;
root:xnu-1699.21.15~1/RELEASE_X86_64
Kernel configured for up to 16 processors.
8 processors are physically available.
16 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Primary memory available: 12.00 gigabytes
Default processor set: 89 tasks, 418 threads, 16 processors
Load average: 1.97, Mach factor: 14.02
/bin/machine   = unknown
/usr/bin/oslevel   = unknown
/bin/universe  = unknown

PATH: /usr/local/bin
PATH: /bin
PATH: /usr/bin
PATH: /Users/marius/Development/mports/ports/bin
PATH: /sbin
PATH: /usr/sbin
PATH: /usr/X11R6/bin
PATH: /Users/marius/Development/mports/ports/gcc+4.6


## --- ##
## Core tests. ##
## --- ##

configure:1734: loading cache ./config.cache
configure:1903: checking for --enable-version-specific-runtime-libs
configure:1916: result: no
configure:1964: checking for a BSD-compatible install
configure:2032: result: /usr/bin/install -c
configure:2048: checking for gawk
configure:2075: result: gawk
configure:2095: checking build system type
configure:2109: result: x86_64-apple-darwin11
configure:2129: checking host system type
configure:2142: result: x86_64-apple-darwin11
configure:2245: checking for x86_64-apple-darwin11-ar
configure:2272: result: ar
configure:2337: checking for x86_64-apple-darwin11-lipo
configure:2364: result: lipo
configure:2429: checking for x86_64-apple-darwin11-nm
configure:2456: result: /tmp/gcc-4.6.0/build/./gcc/nm
configure:2521: checking for x86_64-apple-darwin11-ranlib
configure:2548: result: ranlib
configure:2613: checking for x86_64-apple-darwin11-strip
configure:2640: result: strip
configure:2702: checking whether ln -s works
configure:2706: result: yes
configure:2723: checking for x86_64-apple-darwin11-gcc
configure:2750: result: /tmp/gcc-4.6.0/build/./gcc/xgcc
-B/tmp/gcc-4.6.0/build/./gcc/ -B/usr/local/gcc-4.6/x86_64-apple-darwin11/bin/
-B/usr/local/gcc-4.6/x86_64-apple-darwin11/lib/ -isystem
/usr/local/gcc-4.6/x86_64-apple-darwin11/include -isystem
/usr/local/gcc-4.6/x86_64-apple-darwin11/sys-include   
configure:3019: checking for C compiler version
configure:3028: /tmp/gcc-4.6.0/build/./gcc/xgcc -B/tmp/gcc-4.6.0/build/./gcc/
-B/usr/local/gcc-4.6/x86_64-apple-darwin11/bin/
-B/usr/local/gcc-4.6/x86_64-apple-darwin11/lib/ -isystem
/usr/local/gcc-4.6/x86_64-apple-darwin11/include -isystem
/usr/local/gcc-4.6/x86_64-apple-darwin11/sys-include--version 5
xgcc (GCC) 4.6.0
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3039: $? = 0
configure:3028: /tmp/gcc-4.6.0/build/./gcc/xgcc -B/tmp/gcc-4.6.0/build/./gcc/
-B/usr/local/gcc-4.6/x86_64-apple-darwin11/bin/
-B/usr/local/gcc-4.6/x86_64-apple-darwin11/lib/ -isystem
/usr/local/gcc-4.6/x86_64-apple-darwin11/include -isystem
/usr/local/gcc-4.6/x86_64-apple-darwin11/sys-include-v 5
Reading specs from /tmp/gcc-4.6.0/build/./gcc/specs
COLLECT_GCC=/tmp/gcc-4.6.0/build/./gcc/xgcc

[Bug c/48388] libgcc compilation causes a segfault

2011-03-31 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48388

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE

--- Comment #1 from Richard Guenther rguenth at gcc dot gnu.org 2011-03-31 
15:31:38 UTC ---
llvm bug

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


[Bug target/48301] Xcode 4.0's llvm-gcc can't bootstrap gcc 4.6.0 or trunk

2011-03-31 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48301

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 CC||mschamschula at gmail dot
   ||com

--- Comment #6 from Richard Guenther rguenth at gcc dot gnu.org 2011-03-31 
15:31:38 UTC ---
*** Bug 48388 has been marked as a duplicate of this bug. ***


[Bug rtl-optimization/48389] New: [4.5/4.6/4.7 Regression] ICE: in make_edges, at cfgbuild.c:319 with -mtune=pentiumpro

2011-03-31 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48389

   Summary: [4.5/4.6/4.7 Regression] ICE: in make_edges, at
cfgbuild.c:319 with -mtune=pentiumpro
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zso...@seznam.cz
  Host: x86_64-pc-linux-gnu
Target: i686-pc-linux-gnu


Created attachment 23838
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=23838
reduced testcase

Compiler output:
$ gcc -O -m32 -mtune=pentiumpro testcase.c -Wno-abi
testcase.c: In function 'foo':
testcase.c:9:1: internal compiler error: in make_edges, at cfgbuild.c:319
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.

(gdb) bt
#0  fancy_abort (file=0x134 /mnt/svn/gcc-trunk/gcc/cfgbuild.c, line=319,
function=0x1348a01 make_edges)
at /mnt/svn/gcc-trunk/gcc/diagnostic.c:892
#1  0x00f57610 in make_edges (blocks=Unhandled dwarf expression opcode
0xf3
) at /mnt/svn/gcc-trunk/gcc/cfgbuild.c:319
#2  find_many_sub_basic_blocks (blocks=Unhandled dwarf expression opcode 0xf3
) at /mnt/svn/gcc-trunk/gcc/cfgbuild.c:595
#3  0x005e3f78 in gimple_expand_cfg () at
/mnt/svn/gcc-trunk/gcc/cfgexpand.c:4199
#4  0x007f0486 in execute_one_pass (pass=0x1648ac0) at
/mnt/svn/gcc-trunk/gcc/passes.c:1555
#5  0x007f0775 in execute_pass_list (pass=0x1648ac0) at
/mnt/svn/gcc-trunk/gcc/passes.c:1610
#6  0x009353d5 in tree_rest_of_compilation (fndecl=0x75978100) at
/mnt/svn/gcc-trunk/gcc/tree-optimize.c:422
#7  0x00b010c7 in cgraph_expand_function (node=0x75992000) at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1575
#8  0x00b0381c in cgraph_expand_all_functions () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1634
#9  cgraph_optimize () at /mnt/svn/gcc-trunk/gcc/cgraphunit.c:1898
#10 0x00b03d9a in cgraph_finalize_compilation_unit () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1095
#11 0x00508de4 in c_write_global_declarations () at
/mnt/svn/gcc-trunk/gcc/c-decl.c:9879
#12 0x008de0fd in compile_file (argc=17, argv=0x7fffdc88) at
/mnt/svn/gcc-trunk/gcc/toplev.c:591
#13 do_compile (argc=17, argv=0x7fffdc88) at
/mnt/svn/gcc-trunk/gcc/toplev.c:1900
#14 toplev_main (argc=17, argv=0x7fffdc88) at
/mnt/svn/gcc-trunk/gcc/toplev.c:1963
#15 0x76487b6d in __libc_start_main () from /lib/libc.so.6
#16 0x004ef7f9 in _start ()

Tested revisions:
r171775 - crash
4.6 r171597 - crash
4.5 r171597 - crash
4.4 r171597 - OK


[Bug go/48019] Need to handle EINTR in libgo testsuite

2011-03-31 Thread ro at CeBiTec dot Uni-Bielefeld.DE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48019

--- Comment #13 from ro at CeBiTec dot Uni-Bielefeld.DE ro at CeBiTec dot 
Uni-Bielefeld.DE 2011-03-31 16:00:53 UTC ---
 OK, so now we know that connect ignores SA_RESTART, but I forgot to ask about
 accept.  Can you try this program as well?

 On GNU/Linux it prints accept succeeded.

Sure: on Solaris 8/x86 and Solaris 11/SPARC, I get

accept: Interrupted system call

On IRIX 6.5 and Tru64 UNIX V5.1, I get

accept succeeded

Rainer


[Bug libstdc++/48382] ctype_noninline.h should not be installed

2011-03-31 Thread paolo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48382

--- Comment #3 from paolo at gcc dot gnu.org paolo at gcc dot gnu.org 
2011-03-31 16:06:20 UTC ---
Author: paolo
Date: Thu Mar 31 16:06:12 2011
New Revision: 171790

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=171790
Log:
2011-03-31  Paolo Carlini  paolo.carl...@oracle.com

PR libstdc++/48382
* src/ctype.cc: Do not include bits/ctype_noninline.h.
* src/Makefile.am: Add ctype_configure_char.cc to host_sources.
* src/Makefile.in: Regenerate.
* include/Makefile.am: Remove ctype_noninline.h from host_headers.
* include/Makefile.in: Regenerate.
* doc/xml/manual/internals.xml: Update.
* config/os/newlib/ctype_noninline.h: Fixup and rename to...
* config/os/newlib/ctype_configure_char.cc: ... this.
* config/os/aix/ctype_noninline.h: Likewise.
* config/os/aix/ctype_configure_char.cc: Likewise.
* config/os/vxworks/ctype_noninline.h: Likewise.
* config/os/vxworks/ctype_configure_char.cc
* config/os/hpux/ctype_noninline.h: Likewise.
* config/os/hpux/ctype_configure_char.cc: Likewise.
* config/os/gnu-linux/ctype_noninline.h: Likewise.
* config/os/gnu-linux/ctype_configure_char.cc: Likewise.
* config/os/mingw32/ctype_noninline.h: Likewise.
* config/os/mingw32/ctype_configure_char.cc: Likewise.
* config/os/tpf/ctype_noninline.h: Likewise.
* config/os/tpf/ctype_configure_char.cc: Likewise.
* config/os/uclibc/ctype_noninline.h: Likewise.
* config/os/uclibc/ctype_configure_char.cc: Likewise.
* config/os/bionic/ctype_noninline.h: Likewise.
* config/os/bionic/ctype_configure_char.cc: Likewise.
* config/os/djgpp/ctype_noninline.h: Likewise.
* config/os/djgpp/ctype_configure_char.cc: Likewise.
* config/os/qnx/qnx6.1/ctype_noninline.h: Likewise.
* config/os/qnx/qnx6.1/ctype_configure_char.cc: Likewise.
* config/os/bsd/netbsd/ctype_noninline.h: Likewise.
* config/os/bsd/netbsd/ctype_configure_char.cc: Likewise.
* config/os/bsd/darwin/ctype_noninline.h: Likewise.
* config/os/bsd/darwin/ctype_configure_char.cc: Likewise.
* config/os/bsd/freebsd/ctype_noninline.h: Likewise.
* config/os/bsd/freebsd/ctype_configure_char.cc: Likewise.
* config/os/irix/irix6.5/ctype_noninline.h: Likewise.
* config/os/irix/irix6.5/ctype_configure_char.cc: Likewise.
* config/os/generic/ctype_noninline.h: Likewise.
* config/os/generic/ctype_configure_char.cc: Likewise.
* config/os/solaris/solaris2.7/ctype_noninline.h: Likewise.
* config/os/solaris/solaris2.7/ctype_configure_char.cc: Likewise.


Added:
trunk/libstdc++-v3/config/os/aix/ctype_configure_char.cc
  - copied, changed from r171782,
trunk/libstdc++-v3/config/os/aix/ctype_noninline.h
trunk/libstdc++-v3/config/os/bionic/ctype_configure_char.cc
  - copied, changed from r171779,
trunk/libstdc++-v3/config/os/bionic/ctype_noninline.h
trunk/libstdc++-v3/config/os/bsd/darwin/ctype_configure_char.cc
  - copied, changed from r171779,
trunk/libstdc++-v3/config/os/bsd/darwin/ctype_noninline.h
trunk/libstdc++-v3/config/os/bsd/freebsd/ctype_configure_char.cc
  - copied, changed from r171779,
trunk/libstdc++-v3/config/os/bsd/freebsd/ctype_noninline.h
trunk/libstdc++-v3/config/os/bsd/netbsd/ctype_configure_char.cc
  - copied, changed from r171779,
trunk/libstdc++-v3/config/os/bsd/netbsd/ctype_noninline.h
trunk/libstdc++-v3/config/os/djgpp/ctype_configure_char.cc
  - copied, changed from r171779,
trunk/libstdc++-v3/config/os/djgpp/ctype_noninline.h
trunk/libstdc++-v3/config/os/generic/ctype_configure_char.cc
  - copied, changed from r171779,
trunk/libstdc++-v3/config/os/generic/ctype_noninline.h
trunk/libstdc++-v3/config/os/gnu-linux/ctype_configure_char.cc
  - copied, changed from r171779,
trunk/libstdc++-v3/config/os/gnu-linux/ctype_noninline.h
trunk/libstdc++-v3/config/os/hpux/ctype_configure_char.cc
  - copied, changed from r171779,
trunk/libstdc++-v3/config/os/hpux/ctype_noninline.h
trunk/libstdc++-v3/config/os/irix/irix6.5/ctype_configure_char.cc
  - copied, changed from r171779,
trunk/libstdc++-v3/config/os/irix/irix6.5/ctype_noninline.h
trunk/libstdc++-v3/config/os/mingw32/ctype_configure_char.cc
  - copied, changed from r171779,
trunk/libstdc++-v3/config/os/mingw32/ctype_noninline.h
trunk/libstdc++-v3/config/os/newlib/ctype_configure_char.cc
  - copied, changed from r171779,
trunk/libstdc++-v3/config/os/newlib/ctype_noninline.h
trunk/libstdc++-v3/config/os/qnx/qnx6.1/ctype_configure_char.cc
  - copied, changed from r171779,
trunk/libstdc++-v3/config/os/qnx/qnx6.1/ctype_noninline.h
trunk/libstdc++-v3/config/os/solaris/solaris2.7/ctype_configure_char.cc
  - copied, changed from r171779,
trunk/libstdc++-v3/config/os/solaris/solaris2.7/ctype_noninline.h
trunk/libstdc++-v3/config/os/tpf/ctype_configure_char.cc
  - copied, changed from r171779,

[Bug libstdc++/48382] ctype_noninline.h should not be installed

2011-03-31 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48382

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #4 from Paolo Carlini paolo.carlini at oracle dot com 2011-03-31 
16:10:43 UTC ---
Done.


[Bug middle-end/48390] New: Multiple setting to restricted pointer variable not optimized away

2011-03-31 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48390

   Summary: Multiple setting to restricted pointer variable not
optimized away
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: bur...@gcc.gnu.org


Missed optimization: In the following program, the first a = 1 line can be
removed - as the setting is not used and the value is latter overridden,
however, the line remains even with -O3.


function foo (a, b, c, ptr)
 real :: a, b, c, foo
 real, pointer :: ptr

 a = 1 ! Can delete
 b = ptr + 2
 a = 3

 foo = a + b
end function


From the -O3 dump:

foo (real(kind=4)  restrict a, real(kind=4)  restrict b, real(kind=4) 
restrict c, real(kind=4) *  ptr)
{ [...]
  *a_1(D) = 1.0e+0;  /* Expected: This line is removed.  */
[...]
  *a_1(D) = 3.0e+0;


The same result is obtained for the equivalent C program:

float
foo (float * restrict a, float * restrict b, float * restrict c, float *ptr)
{
 *a = 1; /* Can delete.  */
 *b = *ptr + 2;
 *a = 3;

 return *a + *b;
}


Reported in by Daniel Carrera at
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/ec8641acbcbbed10/fdc9369d5acf53f1#fdc9369d5acf53f1


[Bug tree-optimization/45734] [DR 1116] Devirtualization results in wrong-code

2011-03-31 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45734

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|SUSPENDED
   Target Milestone|4.6.1   |---

--- Comment #6 from Jason Merrill jason at gcc dot gnu.org 2011-03-31 
16:11:02 UTC ---
Suspending until the DR is resolved.  We didn't get to it in time for C++0x,
but the committee seemed to agree that these should be undefined.


[Bug c++/45665] [4.4/4.5 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in grokdeclarator, at cp/decl.c:8797 on invalid code

2011-03-31 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45665

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||jason at gcc dot gnu.org
  Known to work||
 Resolution||FIXED
   Target Milestone|4.6.1   |4.6.0
  Known to fail||

--- Comment #6 from Jason Merrill jason at gcc dot gnu.org 2011-03-31 
16:13:45 UTC ---
Doesn't seem worth backporting a fix for ice after valid error.


[Bug middle-end/48390] Multiple setting to restricted pointer variable not optimized away

2011-03-31 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48390

--- Comment #1 from Tobias Burnus burnus at gcc dot gnu.org 2011-03-31 
16:15:56 UTC ---
For the C case: If ptr is also restrict, the *a = 1 is optimized away.
Ditto for Fortran, if ptr is not a POINTER but a normal variable.

In case of Fortran, the a/b/c cannot alias with ptr as none of has the TARGET
attribute. I would expect the same for C99 as a/b/c are restrict but maybe I
am wrong about the C99 semantics.


[Bug c++/48391] New: tr1/memory's shared_ptr causing excessive system memory consumption

2011-03-31 Thread arch.jslin at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48391

   Summary: tr1/memory's shared_ptr causing excessive system
memory consumption
   Product: gcc
   Version: 4.5.2
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: arch.js...@gmail.com


Created attachment 23839
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=23839
example for the tr1/memory's shared_ptr possible bug.

OS: Windows 7 64-bit
Compiler: MinGW gcc 4.5.2-tdm1 32-bit

As shown in the attachment, the shared_ptr usage in the first part of the main
function will cause excessive system memory consumption (which will not show in
process' memory usage). While the second part of the main function, calling a
multi-threaded task in conjunction with the shared_ptr's memory problem, will
actually cause the OS to throw an exception to abort the program in just a
dozen of seconds.

In this short example I'm pretty sure something is wrong with tr1/memory's
shared_ptr. If you changed to boost/tr1/memory.hpp (and please don't specify
BOOST_HAS_TR1_SHARED_PTR), all codes executed and finished without any problem.


[Bug c++/48391] tr1/memory's shared_ptr causing excessive system memory consumption

2011-03-31 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48391

--- Comment #1 from Jonathan Wakely redi at gcc dot gnu.org 2011-03-31 
16:37:26 UTC ---
I think this is probably a dup of PR 46455


[Bug target/48301] Xcode 4.0's llvm-gcc can't bootstrap gcc 4.6.0 or trunk

2011-03-31 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48301

--- Comment #7 from Jack Howarth howarth at nitro dot med.uc.edu 2011-03-31 
16:43:28 UTC ---
This issue has been fixed in Apple's llvm-gcc at revision 128619. It is unclear
if this fix will make it into llvm.org's llvm-gcc-4.2 2.9 release (which is
slated to be the final one with llvm-gcc). The patch...

http://llvm.org/bugs/show_bug.cgi?id=9571#c13

can be manually applied if it isn't. I've confirmed that this fixes the
bootstraps of both 4.4.5 and 4.6.0.


[Bug bootstrap/48392] New: [regression] bootstrap errors on an x86_64-unknown-linux-gnu, slackware 13.0 box

2011-03-31 Thread ronis at ronispc dot chem.mcgill.ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48392

   Summary: [regression] bootstrap errors on an
x86_64-unknown-linux-gnu, slackware 13.0 box
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: ro...@ronispc.chem.mcgill.ca


I'm trying to upgraded from 4.4.3 to 4.6.0 on a 64 bit machine, running
slackware 13.0 box i
.  Two problems have occurred:  

1.  ar wasn't found (I've got binutils 2.21 installed).   The build complained
of not finding 686-pc-linux-gnu-ar.   I fixed this by setting AR=ar.

2.  The build still dies with:

make[5]: *** [_muldi3.o] Error 1
make[5]: *** Waiting for unfinished jobs
cc   -g -O2 -O2  -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-d
efinition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector   -I. -
I. -I../.././gcc -I../../../gcc/libgcc -I../../../gcc/libgcc/.
-I../../../gcc/libgcc/../gcc -I../../../gcc/libgcc/../include -
I../../../gcc/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS 
-DUSE_TLS -o _fixunsxfdi.o -MT _fixunsxfdi.o -MD
 -MP -MF _fixunsxfdi.dep -DL_fixunsxfdi -c ../../../gcc/libgcc/../gcc/libgcc2.c
\
  -fvisibility=hidden -DHIDE_EXPORTS
In file included from /usr/include/features.h:354,
 from /usr/include/stdio.h:28,
 from ../../../../gcc/libgcc/../gcc/tsystem.h:87,
 from ../../../../gcc/libgcc/../gcc/libgcc2.c:29:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
make[5]: *** [_negdi2.o] Error 1

I'm not trying to build a cross-compiler.


[Bug bootstrap/48392] [regression] bootstrap errors on an x86_64-unknown-linux-gnu, slackware 13.0 box

2011-03-31 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48392

--- Comment #1 from Jonathan Wakely redi at gcc dot gnu.org 2011-03-31 
16:56:30 UTC ---
how did you configure gcc?  do you have 32bit glibc installed?


[Bug c++/48391] tr1/memory's shared_ptr causing excessive system memory consumption

2011-03-31 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48391

--- Comment #2 from Jonathan Wakely redi at gcc dot gnu.org 2011-03-31 
16:57:05 UTC ---
to summarise: there's nothing wrong with shared_ptr itself, but prior to GCC
4.6 our mutex had no destructor, so if shared_ptr uses a mutex it leaks
resources

mingw seem to have changed something which made this latent bug show up in GCC
4.5, possibly changing the value of __gnu_cxx::__default_lock_policy from 2 to
1 (causing a mutex to be used in shared_ptr)

the GCC 4.6 branch has been fixed by this commit:
http://gcc.gnu.org/viewcvs?view=revisionrevision=166917

someone could either backport that fix to TDM-GCC or set
__gnu_cxx::__default_lock_policy = 2


[Bug bootstrap/48392] [regression] bootstrap errors on an x86_64-unknown-linux-gnu, slackware 13.0 box

2011-03-31 Thread ronis at ronispc dot chem.mcgill.ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48392

--- Comment #2 from ronis at ronispc dot chem.mcgill.ca 2011-03-31 17:09:10 UTC 
---
I configured with:

 ../gcc/configure --host=i686-pc-linux-gnu --prefix=/usr --with-gnu-as
--enable-shared --with-gnu-ld --enable-threads=posix
--with-ecj-jar=/usr/share/java/ecj.jar
--enablelanguages=c,c++,fortran,java,objc --enable-bootstrap

As to libc, I've got /lib64/libc.so.6 as well as libc-2.9.so.  Neither file
appears in /lib.


[Bug bootstrap/48392] [regression] bootstrap errors on an x86_64-unknown-linux-gnu, slackware 13.0 box

2011-03-31 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48392

--- Comment #3 from Jonathan Wakely redi at gcc dot gnu.org 2011-03-31 
17:15:21 UTC ---
you need to install the 32bit glibc headers and libraries if you want to
compile for 32bit


[Bug c++/48391] tr1/memory's shared_ptr causing excessive system memory consumption

2011-03-31 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48391

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

   Severity|major   |normal


[Bug bootstrap/48392] [regression] bootstrap errors on an x86_64-unknown-linux-gnu, slackware 13.0 box

2011-03-31 Thread froydnj at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48392

--- Comment #4 from froydnj at codesourcery dot com froydnj at codesourcery 
dot com 2011-03-31 17:18:33 UTC ---
Or at least don't pass --host if you don't need it; configure will do a
fine job of figuring things out on its own.

Since you don't have the 32-bit libraries installed, you may also need
--disable-multilib.


[Bug bootstrap/48392] [regression] bootstrap errors on an x86_64-unknown-linux-gnu, slackware 13.0 box

2011-03-31 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48392

Andrew Pinski pinskia at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||WORKSFORME

--- Comment #5 from Andrew Pinski pinskia at gcc dot gnu.org 2011-03-31 
17:19:09 UTC ---
(In reply to comment #2)
 I configured with:
 
  ../gcc/configure --host=i686-pc-linux-gnu

You are configuring for a cross compiler which I doubt you want anyways.  Just
remove the --host part and install the 32bit glibc (or use --disable-mutlilib).


[Bug tree-optimization/48393] New: ICE: in omega_add_zero_geq, at omega.h:274 with -fcheck-data-deps --param omega-max-geqs=0

2011-03-31 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48393

   Summary: ICE: in omega_add_zero_geq, at omega.h:274 with
-fcheck-data-deps --param omega-max-geqs=0
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zso...@seznam.cz
  Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu


Created attachment 23840
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=23840
reduced testcase (the same as gcc.dg/tree-ssa/pr42327.c)

Compiler output:
$ gcc -O -fcheck-data-deps --param omega-max-geqs=0 testcase.c 
testcase.c: In function 'foo':
testcase.c:1:6: internal compiler error: in omega_add_zero_geq, at omega.h:274
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.


[Bug other/48378] gcc 4.6.0 fails to build from source

2011-03-31 Thread nbi at wideopenwest dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48378

--- Comment #3 from nbi at wideopenwest dot com 2011-03-31 17:35:44 UTC ---
My apologies, I should know better to RTFM for something of GCC's complexity.
Have gotten too used to packages for which only in place configure  make are
neccessary. Will update upon building the correct way.


[Bug c++/48391] tr1/memory's shared_ptr causing excessive system memory consumption

2011-03-31 Thread arch.jslin at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48391

--- Comment #3 from Johnson Lin arch.jslin at gmail dot com 2011-03-31 
17:38:47 UTC ---
Many thanks for the brief and clear explanation. :)


[Bug bootstrap/48392] [regression] bootstrap errors on an x86_64-unknown-linux-gnu, slackware 13.0 box

2011-03-31 Thread ronis at ronispc dot chem.mcgill.ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48392

--- Comment #6 from ronis at ronispc dot chem.mcgill.ca 2011-03-31 17:53:53 UTC 
---
Removing the --host and adding --disable-multilib seems to have worked.

Thanks!


[Bug libstdc++/46455] resource leaks due to missing destructors for mutexes and condvars

2011-03-31 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46455

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

 CC||arch.jslin at gmail dot com

--- Comment #38 from Jonathan Wakely redi at gcc dot gnu.org 2011-03-31 
17:59:22 UTC ---
*** Bug 48391 has been marked as a duplicate of this bug. ***


[Bug c++/48391] tr1/memory's shared_ptr causing excessive system memory consumption

2011-03-31 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48391

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE

--- Comment #4 from Jonathan Wakely redi at gcc dot gnu.org 2011-03-31 
17:59:22 UTC ---
I'm going to close this as a dup, reopen if you think it's a different leak

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


[Bug debug/48343] [4.6/4.7 Regression] ICE compiling i586 linux-2.6.38/drivers/staging/wlan-ng/p80211wep.c: in form_sum, at reload.c:5338

2011-03-31 Thread pcpa at mandriva dot com.br
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48343

--- Comment #8 from Paulo César Pereira de Andrade pcpa at mandriva dot 
com.br 2011-03-31 18:06:05 UTC ---
(In reply to comment #6)
 Created attachment 23821 [details]
 gcc46-pr48343.patch
 
 Untested fix.

  I also confirm gcc built with this patch compiles the i586
kernel, and after installing the generated kernel, and running
several lmbench tests I see no problems.

  Feel free to close the bug report if appropriate.

Thanks.


[Bug fortran/48352] [4.7 Regression] segfault in fortran/frontend-passes.c

2011-03-31 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48352

Thomas Koenig tkoenig at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 AssignedTo|unassigned at gcc dot   |tkoenig at gcc dot gnu.org
   |gnu.org |

--- Comment #7 from Thomas Koenig tkoenig at gcc dot gnu.org 2011-03-31 
18:31:22 UTC ---
(In reply to comment #5)
 reduced:
 
 INTEGER, DIMENSION(:), POINTER :: a
 DO I=1,MIN(SIZE(a),SIZE(a))
 ENDDO
 END

Thanks, Joost.

Slightly more reduced test case (from the point of
stepping through the code):

interface
   pure integer function f()
   end function f
end interface
DO I=1,min(f(),f())
ENDDO
END

Somehow, the insertion of the statement with the extra variable doesn't
work for DO loops.


[Bug target/48262] [4.7 Regression] Subversion id 171341 breaks various vectorization files on powerpc

2011-03-31 Thread meissner at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48262

--- Comment #16 from Michael Meissner meissner at gcc dot gnu.org 2011-03-31 
18:38:41 UTC ---
Created attachment 23841
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=23841
Patch to fix the problem, originally from Andrew Pinski


[Bug target/48262] [4.7 Regression] Subversion id 171341 breaks various vectorization files on powerpc

2011-03-31 Thread meissner at linux dot vnet.ibm.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48262

--- Comment #17 from Michael Meissner meissner at linux dot vnet.ibm.com 
2011-03-31 18:43:44 UTC ---
On Wed, Mar 30, 2011 at 09:43:05PM +, dominiq at lps dot ens.fr wrote:
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48262
 
 --- Comment #15 from Dominique d'Humieres dominiq at lps dot ens.fr 
 2011-03-30 21:42:39 UTC ---
 Test results with the patches in comment #5 and #6 posted at
 http://gcc.gnu.org/ml/gcc-testresults/2011-03/msg02627.html and
 http://gcc.gnu.org/ml/gcc-testresults/2011-03/msg02983.html with no new
 regression. Could the patches be committed?
 
 -- 
 Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
 --- You are receiving this mail because: ---
 You reported the bug.

I was hoping Andrew would submit the patches.  I just sent them out, for
review:

http://gcc.gnu.org/ml/gcc-patches/2011-03/msg02249.html


[Bug c++/48394] New: ObjC exceptions cannot be caught in ObjC++

2011-03-31 Thread js-gcc at webkeks dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48394

   Summary: ObjC exceptions cannot be caught in ObjC++
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: js-...@webkeks.org


When trying to catch an ObjC exception in ObjC++, the object you get is bogus.
For example, this crashes:

@try {
@throw [[OFObject alloc] init];
} @catch (id e) {
[e release];
}

Trying to printf(%p, …) the exception before the throw and in the catch shows
that the pointer differs, which should not happen. I had this bug in various
GCC versions from 4.2 up to 4.6. I suspect even earlier versions are affected.

It would be nice if even for older versions an update could be released,
because some platforms are still stuck with gcc 4.2 or 4.4.


[Bug middle-end/48395] New: [AVR] ICE: segmentation fault when compiling libgcc2.c, SVN trunk r171783

2011-03-31 Thread j at uriah dot heep.sax.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48395

   Summary: [AVR] ICE: segmentation fault when compiling
libgcc2.c, SVN trunk r171783
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: middle-end
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: j...@uriah.heep.sax.de


Created attachment 23842
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=23842
GDB transcript

trunk r171783 cannot compile its own libgcc2.c for the AVR target:

gmake[4]: Entering directory `/junk/gcc/trunk/build-avr/avr/avr25/libgcc'
# If this is the top-level multilib, build all the other
# multilibs.
/junk/gcc/trunk/build-avr/./gcc/xgcc -B/junk/gcc/trunk/build-avr/./gcc/
-B/junk/testroot/avr/bin/ -B/junk/testroot/avr/lib/ -isystem
/junk/testroot/avr/include -isystem /junk/testroot/avr/sys-include-g -O2
-mmcu=avr25 -O2  -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall
-Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include  -DDF=SF -Dinhibit_libc
-mcall-prologues -Os -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
-fno-stack-protector -Dinhibit_libc  -I. -I. -I../../.././gcc
-I../../../../libgcc -I../../../../libgcc/. -I../../../../libgcc/../gcc
-I../../../../libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS -o _negdi2.o -MT
_negdi2.o -MD -MP -MF _negdi2.dep -DL_negdi2 -c
../../../../libgcc/../gcc/libgcc2.c \

../../../../libgcc/../gcc/libgcc2.c: In function ‘__negdi2’:
../../../../libgcc/../gcc/libgcc2.c:68:17: internal compiler error:
Segmentation fault: 11
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.
gmake[4]: *** [_negdi2.o] Error 1
gmake[4]: Leaving directory `/junk/gcc/trunk/build-avr/avr/avr25/libgcc'
gmake[3]: *** [multi-do] Error 1
gmake[3]: Leaving directory `/junk/gcc/trunk/build-avr/avr/libgcc'
gmake[2]: *** [all-multi] Error 2
gmake[2]: Leaving directory `/junk/gcc/trunk/build-avr/avr/libgcc'
gmake[1]: *** [all-target-libgcc] Error 2
gmake[1]: Leaving directory `/junk/gcc/trunk/build-avr'
gmake: *** [all] Error 2

(Also attaching the GDB transcript separately for better readability.
See below for my conclusion about the nature of the bug.)

The debugger shows the following stack trace:
(gdb) bt
#0  scratch_operand (op=0x959, mode=HImode) at ../../gcc/recog.c:1078
#1  0x08375db4 in insn_operand_matches (icode=CODE_FOR_setmemhi, opno=4,
operand=0x959) at ../../gcc/optabs.c:6999
#2  0x083760d9 in maybe_legitimize_operands (icode=CODE_FOR_setmemhi, opno=0,
nops=5, ops=0xbfbfda2c) at ../../gcc/optabs.c:7074
#3  0x083762c3 in maybe_gen_insn (icode=CODE_FOR_setmemhi, nops=5,
ops=0xbfbfda2c) at ../../gcc/optabs.c:7124
#4  0x083764cf in maybe_expand_insn (icode=CODE_FOR_setmemhi, nops=5,
ops=0xbfbfda2c) at ../../gcc/optabs.c:7155
#5  0x08231f19 in set_storage_via_setmem (object=0x28b4f2dc, size=0x28a1b2f8,
val=0x28a1b2b8, align=Variable align is not available.
) at ../../gcc/expr.c:2738
#6  0x08246b41 in clear_storage_hints (object=0x28b4f2dc, size=0x28a1b2f8,
method=BLOCK_OP_NORMAL, expected_align=0, 
expected_size=-1) at ../../gcc/expr.c:2579
#7  0x08246c7f in clear_storage (object=0x28b4f2dc, size=0x28a1b2f8,
method=BLOCK_OP_NORMAL) at ../../gcc/expr.c:2594
#8  0x08239a1d in store_constructor (exp=0x28b10848, target=0x28b4f2dc,
cleared=0, size=8) at ../../gcc/expr.c:5196
#9  0x0823a729 in expand_constructor (exp=0x28b10848, target=0x28b4f2dc,
modifier=EXPAND_NORMAL, avoid_temp_mem=0 '\0')
at ../../gcc/expr.c:7100
#10 0x0823d56a in expand_expr_real_1 (exp=0x28b10848, target=0x28b4f2dc,
tmode=BLKmode, modifier=EXPAND_NORMAL, alt_rtl=0xbfbfdd9c)
at ../../gcc/expr.c:8659
#11 0x08246d53 in store_expr (exp=0x28b10848, target=0x28b4f2dc,
call_param_p=0, nontemporal=0 '\0') at ../../gcc/expr.c:4653
#12 0x08236f47 in expand_assignment (to=0x28b2b120, from=0x28b10848,
nontemporal=Variable nontemporal is not available.
) at ../../gcc/expr.c:4441
#13 0x081950a1 in expand_gimple_stmt (stmt=0x28b2f6c0) at
../../gcc/cfgexpand.c:1972
#14 0x08195a98 in expand_gimple_basic_block (bb=0x28a926c0) at
../../gcc/cfgexpand.c:3637
#15 0x08197028 in gimple_expand_cfg () at ../../gcc/cfgexpand.c:4120
#16 0x08391a57 in execute_one_pass (pass=0x881b120) at ../../gcc/passes.c:1555
#17 0x08391e9d in execute_pass_list (pass=0x881b120) at ../../gcc/passes.c:1610
#18 0x0847174a in tree_rest_of_compilation (fndecl=0x28afea00) at
../../gcc/tree-optimize.c:422
#19 0x0861c209 in cgraph_expand_function (node=0x28b09f24) at
../../gcc/cgraphunit.c:1575
#20 0x0861f842 in cgraph_optimize () at ../../gcc/cgraphunit.c:1634
#21 0x0861fd2a in cgraph_finalize_compilation_unit () at
../../gcc/cgraphunit.c:1095
#22 0x080a3998 in c_write_global_declarations () at ../../gcc/c-decl.c:9879
#23 0x0840af90 in do_compile () at ../../gcc/toplev.c:591
#24 0x0840b73d in toplev_main (argc=83, 

[Bug rtl-optimization/48381] [4.7 Regression] internal compiler error: in check_allocation, at ira.c:2094

2011-03-31 Thread vmakarov at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48381

Vladimir Makarov vmakarov at redhat dot com changed:

   What|Removed |Added

 CC||vmakarov at redhat dot com

--- Comment #2 from Vladimir Makarov vmakarov at redhat dot com 2011-03-31 
19:06:57 UTC ---
Jakub, thanks for reducing the test.  It really saved my time.

We have the following situation:

  Allocno a7r74 of CREG(1) has 1 avail. regs 2 (confl regs =  0 1 3-51 )
node:  2
  ...
  Allocno a10r80 of GENERAL_REGS(6) has 5 avail. regs obj 0 0-5 (confl regs
=  6-51 ) node:  0-5,  obj 1 0-5 (confl regs =  6-51 ) node:  0-5
  ...
  Popping a7(r74,l0)  -- assign reg 2
  ..
  Popping a10(r80,l0)  -- (memory is more profitable 7000 vs 2147483647)
spill
...
Spilling a7r74 for a10r80
Assigning 1 to a10r80
   a7(r74,l0)  -- assign hard reg 2

r74 got C reg and r80 was spilled.  Than function improve_allocation decides
that spilling r74 and assigning hard reg to r84 is more profitable.  The
function at the end of its work was trying to assign another hard reg to r74
and assign C reg again which is wrong because of r80 needs two hard registers
DX and CX.

The wrong assignment is because of wrong code in function (assign_hard_reg)
searching conflicting hard regs.  The code deciding that conflicting allocnos
really conflicts looks like

  hard_regno = ALLOCNO_HARD_REGNO (conflict_a);
  if (hard_regno = 0  
  ira_class_hard_reg_index[aclass][hard_regno] = 0)

where aclass is class of r84 (CREGS) and hard_regno is r80 hard regno (DX). 
This code was ok for cover classes.  It should be different when different
classes of allocnos can intersect.

I'll send a patch to solve the PR soon.


[Bug middle-end/48395] [AVR] ICE: segmentation fault when compiling libgcc2.c, SVN trunk r171783

2011-03-31 Thread j at uriah dot heep.sax.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48395

--- Comment #1 from Joerg Wunsch j at uriah dot heep.sax.de 2011-03-31 
19:13:13 UTC ---
If I unpatch r171532 from gcc/expr.c (which introduced the current
version of that piece of code), I don't get a segfault anymore but
a different ICE:

../../../../libgcc/../gcc/libgcc2.c: In function ‘__negdi2’:
../../../../libgcc/../gcc/libgcc2.c:68:17: internal compiler error: in
maybe_gen_insn, at optabs.c:7123
Please submit a full bug report,


[Bug libstdc++/48365] Non-constant references in std::valarray::operator

2011-03-31 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48365

--- Comment #2 from Paolo Carlini paolo.carlini at oracle dot com 2011-03-31 
19:18:28 UTC ---
To further clarify, the issue boils down to class _BinBase1 (and _BinBase2)
using only const ref data members for performance reasons, likewise elsewhere
copies are always carefully avoided (for instance in k *= k[0] in my last
message in the audit trail). I could change that, but I want hear Gaby first.


[Bug rtl-optimization/48381] [4.7 Regression] internal compiler error: in check_allocation, at ira.c:2094

2011-03-31 Thread vmakarov at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48381

--- Comment #3 from Vladimir Makarov vmakarov at gcc dot gnu.org 2011-03-31 
19:54:07 UTC ---
Author: vmakarov
Date: Thu Mar 31 19:54:02 2011
New Revision: 171795

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=171795
Log:
2011-03-31  Vladimir Makarov  vmaka...@redhat.com

PR rtl-optimization/48381
* ira-color.c (assign_hard_reg): Use hard reg set intersection
instead of ira_class_hard_reg_index for calculating conflicting
hard registers.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/ira-color.c


[Bug rtl-optimization/48381] [4.7 Regression] internal compiler error: in check_allocation, at ira.c:2094

2011-03-31 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48381

--- Comment #4 from Eric Botcazou ebotcazou at gcc dot gnu.org 2011-03-31 
20:00:56 UTC ---
*** Bug 48364 has been marked as a duplicate of this bug. ***


[Bug rtl-optimization/48364] [4.7 regression] assertion failure in IRA

2011-03-31 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48364

Eric Botcazou ebotcazou at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE

--- Comment #2 from Eric Botcazou ebotcazou at gcc dot gnu.org 2011-03-31 
20:00:56 UTC ---
Fixed.

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


[Bug c++/48280] [4.5/4.6/4.7 Regression] [C++0x] ICE: tree check: expected var_decl or function_decl, have template_decl in check_bases_and_members, at cp/class.c:4695

2011-03-31 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48280

--- Comment #2 from Jason Merrill jason at gcc dot gnu.org 2011-03-31 
20:29:52 UTC ---
Author: jason
Date: Thu Mar 31 20:29:49 2011
New Revision: 171797

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=171797
Log:
PR c++/48280
* method.c (defaultable_fn_check): Templates are not defaultable.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/defaulted24.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/method.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/48280] [4.5/4.6/4.7 Regression] [C++0x] ICE: tree check: expected var_decl or function_decl, have template_decl in check_bases_and_members, at cp/class.c:4695

2011-03-31 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48280

--- Comment #3 from Jason Merrill jason at gcc dot gnu.org 2011-03-31 
20:33:10 UTC ---
Author: jason
Date: Thu Mar 31 20:33:07 2011
New Revision: 171798

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=171798
Log:
PR c++/48280
* method.c (defaultable_fn_check): Templates are not defaultable.

Added:
branches/gcc-4_6-branch/gcc/testsuite/g++.dg/cpp0x/defaulted24.C
Modified:
branches/gcc-4_6-branch/gcc/cp/ChangeLog
branches/gcc-4_6-branch/gcc/cp/method.c
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog


[Bug c++/48280] [4.5/4.6/4.7 Regression] [C++0x] ICE: tree check: expected var_decl or function_decl, have template_decl in check_bases_and_members, at cp/class.c:4695

2011-03-31 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48280

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||jason at gcc dot gnu.org
 Resolution||FIXED
   Target Milestone|4.5.3   |4.6.1

--- Comment #4 from Jason Merrill jason at gcc dot gnu.org 2011-03-31 
20:33:57 UTC ---
Fixed for 4.6.1, not backporting to 4.5.


[Bug c++/48212] [4.6/4.7 Regression] [C++0x] ICE: in non_const_var_error, at cp/semantics.c:6700 on invalid code

2011-03-31 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48212

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #4 from Jason Merrill jason at gcc dot gnu.org 2011-03-31 
20:34:52 UTC ---
Fixed.


[Bug target/48380] ICE in postreload.c while building trunk

2011-03-31 Thread rearnsha at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48380

Richard Earnshaw rearnsha at gcc dot gnu.org changed:

   What|Removed |Added

 CC||rearnsha at gcc dot gnu.org

--- Comment #2 from Richard Earnshaw rearnsha at gcc dot gnu.org 2011-03-31 
21:04:29 UTC ---
Here's another case which is probably the same problem.

compile on an arm-eabi cross with 

cc1 -g -O2 -mfloat-abi=hard -std=gnu99 bad.c


  1   2   >