public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/44256]  New: When using -flto and -fwhole-program the compiler/linker crash
@ 2010-05-23 18:04 ttsiodras at gmail dot com
  2010-05-23 18:13 ` [Bug c++/44256] " steven at gcc dot gnu dot org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: ttsiodras at gmail dot com @ 2010-05-23 18:04 UTC (permalink / raw)
  To: gcc-bugs

I saw that with GCC4.5, my software-only 3D renderer got a sizeable speed boost
when using -flto (during compilation) and -flto -fwhole-program (during
linking). I saw this working, successfully, with GCC4.5.0.

I then tried the same thing with 4.5.1 - and got an internal compiler error.
The crash doesn't happen when compiling, it happens at the final - link -
stage,
so there's no preprocessed input to provide... I can only hope that you will be
able to reproduce it on your environment.

The output error message from the linking stage:

lto1: internal compiler error: in gimple_register_type, at gimple.c:3820
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: /usr/local/bin/g++45 returned 1 exit status
collect2: lto-wrapper returned 1 exit status
*** Error code 1

The source code that triggers the bug is here:

   http://users.softlab.ntua.gr/~ttsiod/renderer-2.x.latest.tar.bz2

Just use a simple "./configure && make" - it should be enough to trigger the
error.

The GCC I used:

$ g++45 -v
Using built-in specs.
COLLECT_GCC=g++45
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc45/gcc/x86_64-portbld-freebsd8.0/4.5.1/lto-wrapper
Target: x86_64-portbld-freebsd8.0
Configured with: ./../gcc-4.5-20100520/configure --enable-lto=yes
--with-libelf=/usr/local --disable-nls --libdir=/usr/local/lib/gcc45
--libexecdir=/usr/local/libexec/gcc45 --program-suffix=45
--with-as=/usr/local/bin/as --with-gmp=/usr/local
--with-gxx-include-dir=/usr/local/lib/gcc45/include/c++/
--with-ld=/usr/local/bin/ld --with-libiconv-prefix=/usr/local
--with-system-zlib --disable-rpath --enable-libgcj --prefix=/usr/local
--mandir=/usr/local/man --infodir=/usr/local/info/gcc45
--build=x86_64-portbld-freebsd8.0
Thread model: posix
gcc version 4.5.1 20100520 (prerelease) (GCC)

My system:

$ uname -a
FreeBSD freebsd.gizi.gr 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:02:08
UTC 2009     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

The compilation options generated by configure and used during compilation:

g++45 -DHAVE_CONFIG_H -I.  -I/usr/local/include/SDL -I/usr/local/include
-D_GNU_SOURCE=1 -D_REENTRANT -I./../lib3ds-1.3.0/ -fopenmp  -O3 -g -Wall
-Wextra -fomit-frame-pointer -ffast-math -funsafe-math-optimizations
-mtune=native -flto -msse -mrecip -mfpmath=sse -msse2 -mssse3 -DNDEBUG -MT
renderer-Base3d.o -MD -MP -MF .deps/renderer-Base3d.Tpo -c -o renderer-Base3d.o
`test -f 'Base3d.cc' || echo './'`Base3d.cc

Compilation doesn't trigger the error, linking does, and these are the linking
params:

g++45  -O3 -g -Wall -Wextra -fomit-frame-pointer -ffast-math
-funsafe-math-optimizations -mtune=native -flto -msse -mrecip -mfpmath=sse
-msse2 -mssse3 -DNDEBUG    -o renderer renderer-renderer.o renderer-Algebra.o
renderer-Camera.o  renderer-Keyboard.o renderer-Light.o  renderer-Object3D.o
renderer-Scene.o  renderer-Screen.o renderer-Base3d.o -fwhole-program
-L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL -pthread  -fopenmp
../lib3ds-1.3.0/lib3ds/.libs/lib3ds.a -lstdc++

Anything else I might help with, don't hesitate to ask.


-- 
           Summary: When using -flto and -fwhole-program the compiler/linker
                    crash
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ttsiodras at gmail dot com
 GCC build triplet: x86_64-unknown-freebsd8.0
  GCC host triplet: x86_64-unknown-freebsd8.0
GCC target triplet: x86_64-unknown-freebsd8.0


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/44256] When using -flto and -fwhole-program the compiler/linker crash
  2010-05-23 18:04 [Bug c++/44256] New: When using -flto and -fwhole-program the compiler/linker crash ttsiodras at gmail dot com
@ 2010-05-23 18:13 ` steven at gcc dot gnu dot org
  2010-05-23 20:05 ` rguenth at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-05-23 18:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from steven at gcc dot gnu dot org  2010-05-23 18:13 -------
Did you build with --enable-checking=release?


-- 


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/44256] When using -flto and -fwhole-program the compiler/linker crash
  2010-05-23 18:04 [Bug c++/44256] New: When using -flto and -fwhole-program the compiler/linker crash ttsiodras at gmail dot com
  2010-05-23 18:13 ` [Bug c++/44256] " steven at gcc dot gnu dot org
@ 2010-05-23 20:05 ` rguenth at gcc dot gnu dot org
  2010-05-23 20:09 ` ttsiodras at gmail dot com
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-23 20:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2010-05-23 20:05 -------
Can you add -r to the linker line and bisect the object files needed to produce
the ICE and then attach preprocessed source of them?

Thanks.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
           Keywords|                            |lto


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/44256] When using -flto and -fwhole-program the compiler/linker crash
  2010-05-23 18:04 [Bug c++/44256] New: When using -flto and -fwhole-program the compiler/linker crash ttsiodras at gmail dot com
  2010-05-23 18:13 ` [Bug c++/44256] " steven at gcc dot gnu dot org
  2010-05-23 20:05 ` rguenth at gcc dot gnu dot org
@ 2010-05-23 20:09 ` ttsiodras at gmail dot com
  2010-05-23 20:12 ` ttsiodras at gmail dot com
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ttsiodras at gmail dot com @ 2010-05-23 20:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ttsiodras at gmail dot com  2010-05-23 20:09 -------
To Steven:

I am assuming you are asking about the building of GCC - I did it through the
ports system of FreeBSD, using the latest update of the gcc45 port.

Additionally, I just did an update in my Arch Linux, which got my Arch to
reproduce the same bug - so it is now happening on a 32bit platform, too:

bash$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/usr
--enable-languages=c,c++,fortran,objc,obj-c++,ada --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--enable-gnu-unique-object --enable-lto --enable-plugin --disable-multilib
--disable-libstdcxx-pch --with-system-zlib --with-ppl --with-cloog
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info
Thread model: posix
gcc version 4.5.0 20100520 (prerelease) (GCC) 

bash$ uname -a
Linux home 2.6.33-ARCH #1 SMP PREEMPT Thu May 13 12:06:25 CEST 2010 i686
Intel(R) Core(TM)2 Duo CPU E4500 @ 2.20GHz GenuineIntel GNU/Linux


-- 

ttsiodras at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|lto                         |


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/44256] When using -flto and -fwhole-program the compiler/linker crash
  2010-05-23 18:04 [Bug c++/44256] New: When using -flto and -fwhole-program the compiler/linker crash ttsiodras at gmail dot com
                   ` (2 preceding siblings ...)
  2010-05-23 20:09 ` ttsiodras at gmail dot com
@ 2010-05-23 20:12 ` ttsiodras at gmail dot com
  2010-05-23 20:37 ` rguenth at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ttsiodras at gmail dot com @ 2010-05-23 20:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from ttsiodras at gmail dot com  2010-05-23 20:11 -------
To Richard:

Under my Arch Linux, the linker cmd (that triggers the bug) is:

bash$ g++  -O3 -g -Wall -Wextra -fomit-frame-pointer -ffast-math
-funsafe-math-optimizations -mtune=native -flto -msse -mrecip -mfpmath=sse
-msse2 -mssse3 -DNDEBUG   -o renderer renderer-renderer.o renderer-Algebra.o
renderer-Camera.o renderer-Keyboard.o renderer-Light.o renderer-Object3D.o
renderer-Scene.o renderer-Screen.o renderer-Base3d.o -fwhole-program -L/usr/lib
-lSDL -lpthread  -fopenmp ../lib3ds-1.3.0/lib3ds/.libs/lib3ds.a  -lstdc++
lto1: internal compiler error: in gimple_register_type, at gimple.c:3820
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: /usr/bin/g++ returned 1 exit status
collect2: lto-wrapper returned 1 exit status


So I tried to add "-r" , but...

bash$ g++ -r -O3 -g -Wall -Wextra -fomit-frame-pointer -ffast-math
-funsafe-math-optimizations -mtune=native -flto -msse -mrecip -mfpmath=sse
-msse2 -mssse3 -DNDEBUG   -o renderer renderer-renderer.o renderer-Algebra.o
renderer-Camera.o renderer-Keyboard.o renderer-Light.o renderer-Object3D.o
renderer-Scene.o renderer-Screen.o renderer-Base3d.o -fwhole-program -L/usr/lib
-lSDL -lpthread  -fopenmp ../lib3ds-1.3.0/lib3ds/.libs/lib3ds.a  -lstdc++
/usr/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status

Anything else to try?


-- 


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/44256] When using -flto and -fwhole-program the compiler/linker crash
  2010-05-23 18:04 [Bug c++/44256] New: When using -flto and -fwhole-program the compiler/linker crash ttsiodras at gmail dot com
                   ` (3 preceding siblings ...)
  2010-05-23 20:12 ` ttsiodras at gmail dot com
@ 2010-05-23 20:37 ` rguenth at gcc dot gnu dot org
  2010-05-23 20:48 ` ttsiodras at gmail dot com
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-23 20:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2010-05-23 20:36 -------
(In reply to comment #4)
> To Richard:
> 
> Under my Arch Linux, the linker cmd (that triggers the bug) is:
> 
> bash$ g++  -O3 -g -Wall -Wextra -fomit-frame-pointer -ffast-math
> -funsafe-math-optimizations -mtune=native -flto -msse -mrecip -mfpmath=sse
> -msse2 -mssse3 -DNDEBUG   -o renderer renderer-renderer.o renderer-Algebra.o
> renderer-Camera.o renderer-Keyboard.o renderer-Light.o renderer-Object3D.o
> renderer-Scene.o renderer-Screen.o renderer-Base3d.o -fwhole-program -L/usr/lib
> -lSDL -lpthread  -fopenmp ../lib3ds-1.3.0/lib3ds/.libs/lib3ds.a  -lstdc++
> lto1: internal compiler error: in gimple_register_type, at gimple.c:3820
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html> for instructions.
> lto-wrapper: /usr/bin/g++ returned 1 exit status
> collect2: lto-wrapper returned 1 exit status
> 
> 
> So I tried to add "-r" , but...
> 
> bash$ g++ -r -O3 -g -Wall -Wextra -fomit-frame-pointer -ffast-math
> -funsafe-math-optimizations -mtune=native -flto -msse -mrecip -mfpmath=sse
> -msse2 -mssse3 -DNDEBUG   -o renderer renderer-renderer.o renderer-Algebra.o
> renderer-Camera.o renderer-Keyboard.o renderer-Light.o renderer-Object3D.o
> renderer-Scene.o renderer-Screen.o renderer-Base3d.o -fwhole-program -L/usr/lib
> -lSDL -lpthread  -fopenmp ../lib3ds-1.3.0/lib3ds/.libs/lib3ds.a  -lstdc++
> /usr/bin/ld: cannot find -lgcc_s
> collect2: ld returned 1 exit status
> 
> Anything else to try?

yeah, add -nostdlib as well (you should be able to remove all library
args as well after that).


-- 


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/44256] When using -flto and -fwhole-program the compiler/linker crash
  2010-05-23 18:04 [Bug c++/44256] New: When using -flto and -fwhole-program the compiler/linker crash ttsiodras at gmail dot com
                   ` (4 preceding siblings ...)
  2010-05-23 20:37 ` rguenth at gcc dot gnu dot org
@ 2010-05-23 20:48 ` ttsiodras at gmail dot com
  2010-05-24  7:24 ` ttsiodras at gmail dot com
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ttsiodras at gmail dot com @ 2010-05-23 20:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from ttsiodras at gmail dot com  2010-05-23 20:48 -------
Well, I added "nostdlib" and removed all libraries from the cmd line, but
still:

bash$ g++  -r -nostdlib -O3 -g -Wall -Wextra -fomit-frame-pointer -ffast-math
-funsafe-math-optimizations -mtune=native -flto -msse -mrecip -mfpmath=sse
-msse2 -mssse3 -DNDEBUG   -o renderer renderer-renderer.o renderer-Algebra.o
renderer-Camera.o renderer-Keyboard.o renderer-Light.o renderer-Object3D.o
renderer-Scene.o renderer-Screen.o renderer-Base3d.o -fwhole-program  
lto1: internal compiler error: in gimple_register_type, at gimple.c:3820
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: /usr/bin/g++ returned 1 exit status
collect2: lto-wrapper returned 1 exit status

In fact, it crashes even when I remove -fwhole-program.
It only works if I remove the -flto.


-- 


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/44256] When using -flto and -fwhole-program the compiler/linker crash
  2010-05-23 18:04 [Bug c++/44256] New: When using -flto and -fwhole-program the compiler/linker crash ttsiodras at gmail dot com
                   ` (5 preceding siblings ...)
  2010-05-23 20:48 ` ttsiodras at gmail dot com
@ 2010-05-24  7:24 ` ttsiodras at gmail dot com
  2010-05-24 12:18 ` rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ttsiodras at gmail dot com @ 2010-05-24  7:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from ttsiodras at gmail dot com  2010-05-24 07:24 -------

>From my two tests in FreeBSD and Arch Linux, it appears that the "-flto" bug
that is triggered on my renderer, has occured with the "20100520 (prerelease)"
commits.

I hope this helps....

Is there anything else I can provide?
Again, the GPL code triggering the bug is at:

http://users.softlab.ntua.gr/~ttsiod/renderer-2.x.latest.tar.bz2


-- 


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/44256] When using -flto and -fwhole-program the compiler/linker crash
  2010-05-23 18:04 [Bug c++/44256] New: When using -flto and -fwhole-program the compiler/linker crash ttsiodras at gmail dot com
                   ` (6 preceding siblings ...)
  2010-05-24  7:24 ` ttsiodras at gmail dot com
@ 2010-05-24 12:18 ` rguenth at gcc dot gnu dot org
  2010-05-24 12:25 ` rguenth at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-24 12:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from rguenth at gcc dot gnu dot org  2010-05-24 12:18 -------
(In reply to comment #6)
> Well, I added "nostdlib" and removed all libraries from the cmd line, but
> still:
> 
> bash$ g++  -r -nostdlib -O3 -g -Wall -Wextra -fomit-frame-pointer -ffast-math
> -funsafe-math-optimizations -mtune=native -flto -msse -mrecip -mfpmath=sse
> -msse2 -mssse3 -DNDEBUG   -o renderer renderer-renderer.o renderer-Algebra.o
> renderer-Camera.o renderer-Keyboard.o renderer-Light.o renderer-Object3D.o
> renderer-Scene.o renderer-Screen.o renderer-Base3d.o -fwhole-program  
> lto1: internal compiler error: in gimple_register_type, at gimple.c:3820
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html> for instructions.
> lto-wrapper: /usr/bin/g++ returned 1 exit status
> collect2: lto-wrapper returned 1 exit status
> 
> In fact, it crashes even when I remove -fwhole-program.
> It only works if I remove the -flto.

Yes, now with the above command-line remove .o files one-by one and figure
out the minimal set of *.o files that make it crash.  For those files
please attach pre-processed source.  (I expect it will be a single file)


-- 


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/44256] When using -flto and -fwhole-program the compiler/linker crash
  2010-05-23 18:04 [Bug c++/44256] New: When using -flto and -fwhole-program the compiler/linker crash ttsiodras at gmail dot com
                   ` (7 preceding siblings ...)
  2010-05-24 12:18 ` rguenth at gcc dot gnu dot org
@ 2010-05-24 12:25 ` rguenth at gcc dot gnu dot org
  2010-05-24 12:35 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-24 12:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from rguenth at gcc dot gnu dot org  2010-05-24 12:24 -------
Btw, it reccurs to me that the issue will be fixed by

http://gcc.gnu.org/viewcvs/trunk/gcc/lto/lto.c?r1=158729&r2=158728&pathrev=158729


-- 


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/44256] When using -flto and -fwhole-program the compiler/linker crash
  2010-05-23 18:04 [Bug c++/44256] New: When using -flto and -fwhole-program the compiler/linker crash ttsiodras at gmail dot com
                   ` (8 preceding siblings ...)
  2010-05-24 12:25 ` rguenth at gcc dot gnu dot org
@ 2010-05-24 12:35 ` rguenth at gcc dot gnu dot org
  2010-05-24 12:35 ` rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-24 12:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from rguenth at gcc dot gnu dot org  2010-05-24 12:35 -------
The next snapshot will pick up this fix.


-- 


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/44256] When using -flto and -fwhole-program the compiler/linker crash
  2010-05-23 18:04 [Bug c++/44256] New: When using -flto and -fwhole-program the compiler/linker crash ttsiodras at gmail dot com
                   ` (9 preceding siblings ...)
  2010-05-24 12:35 ` rguenth at gcc dot gnu dot org
@ 2010-05-24 12:35 ` rguenth at gcc dot gnu dot org
  2010-05-24 13:41 ` ttsiodras at gmail dot com
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-24 12:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from rguenth at gcc dot gnu dot org  2010-05-24 12:34 -------
Subject: Bug 44256

Author: rguenth
Date: Mon May 24 12:34:34 2010
New Revision: 159779

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159779
Log:
2010-05-24  Richard Guenther  <rguenther@suse.de>

        PR lto/44256
        * lto.c (lto_fixup_type): Deal with non-type TYPE_CONTEXT.

        * gcc.dg/lto/20100426_0.c: New testcase.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/lto/20100426_0.c
Modified:
    branches/gcc-4_5-branch/gcc/lto/ChangeLog
    branches/gcc-4_5-branch/gcc/lto/lto.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


-- 


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/44256] When using -flto and -fwhole-program the compiler/linker crash
  2010-05-23 18:04 [Bug c++/44256] New: When using -flto and -fwhole-program the compiler/linker crash ttsiodras at gmail dot com
                   ` (10 preceding siblings ...)
  2010-05-24 12:35 ` rguenth at gcc dot gnu dot org
@ 2010-05-24 13:41 ` ttsiodras at gmail dot com
  2010-05-24 13:44 ` ttsiodras at gmail dot com
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ttsiodras at gmail dot com @ 2010-05-24 13:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from ttsiodras at gmail dot com  2010-05-24 13:41 -------

I am at work, so I did a fresh compilation of GCC4.5 from the 20050520 
snapshot under my Debian stable using: 

../configure --prefix=/opt/gcc45 --enable-languages=c,c++ --enable-lto

The bug still happens, even if I trim the link line to include ONLY ONE
object file:

bash$ /opt/gcc-4.5-20100520/bin/g++ -r -nostdlib -O3 -g -Wall -Wextra
-fomit-frame-pointer -ffast-math -funsafe-math-optimizations -mtune=native
-flto -msse -mrecip -mfpmath=sse -msse2 -DNDEBUG   -o renderer
renderer-renderer.o
lto1: internal compiler error: in gimple_register_type, at gimple.c:3820
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: /opt/gcc-4.5-20100520/bin/g++ returned 1 exit status
collect2: lto-wrapper returned 1 exit status


-- 


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/44256] When using -flto and -fwhole-program the compiler/linker crash
  2010-05-23 18:04 [Bug c++/44256] New: When using -flto and -fwhole-program the compiler/linker crash ttsiodras at gmail dot com
                   ` (11 preceding siblings ...)
  2010-05-24 13:41 ` ttsiodras at gmail dot com
@ 2010-05-24 13:44 ` ttsiodras at gmail dot com
  2010-05-24 13:47 ` ttsiodras at gmail dot com
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ttsiodras at gmail dot com @ 2010-05-24 13:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from ttsiodras at gmail dot com  2010-05-24 13:44 -------

I meant 20100520, obviously, not 20050520 (no flto back then! :-)

Anyway, if I understood correctly, I should wait for the next snapshot... ETA?


-- 


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/44256] When using -flto and -fwhole-program the compiler/linker crash
  2010-05-23 18:04 [Bug c++/44256] New: When using -flto and -fwhole-program the compiler/linker crash ttsiodras at gmail dot com
                   ` (12 preceding siblings ...)
  2010-05-24 13:44 ` ttsiodras at gmail dot com
@ 2010-05-24 13:47 ` ttsiodras at gmail dot com
  2010-05-24 18:03 ` rguenth at gcc dot gnu dot org
  2010-05-25  8:41 ` reichelt at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: ttsiodras at gmail dot com @ 2010-05-24 13:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from ttsiodras at gmail dot com  2010-05-24 13:47 -------

And now that we see that it happens even with one object file,
here is the preprocessed (.ii) for the code behind this object file:

http://users.softlab.ntua.gr/~ttsiod/renderer.ii.gz


-- 


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/44256] When using -flto and -fwhole-program the compiler/linker crash
  2010-05-23 18:04 [Bug c++/44256] New: When using -flto and -fwhole-program the compiler/linker crash ttsiodras at gmail dot com
                   ` (13 preceding siblings ...)
  2010-05-24 13:47 ` ttsiodras at gmail dot com
@ 2010-05-24 18:03 ` rguenth at gcc dot gnu dot org
  2010-05-25  8:41 ` reichelt at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-24 18:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from rguenth at gcc dot gnu dot org  2010-05-24 18:02 -------
Thanks.  With the preprocessed source I can confirm the crash and also confirm
that the fix I just committed fixes the crash.

Snapshots are generated every week, so the next is due on May 29th.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.5.1


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/44256] When using -flto and -fwhole-program the compiler/linker crash
  2010-05-23 18:04 [Bug c++/44256] New: When using -flto and -fwhole-program the compiler/linker crash ttsiodras at gmail dot com
                   ` (14 preceding siblings ...)
  2010-05-24 18:03 ` rguenth at gcc dot gnu dot org
@ 2010-05-25  8:41 ` reichelt at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2010-05-25  8:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from reichelt at gcc dot gnu dot org  2010-05-25 08:41 -------
*** Bug 44264 has been marked as a duplicate of this bug. ***


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2010-05-25  8:41 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-23 18:04 [Bug c++/44256] New: When using -flto and -fwhole-program the compiler/linker crash ttsiodras at gmail dot com
2010-05-23 18:13 ` [Bug c++/44256] " steven at gcc dot gnu dot org
2010-05-23 20:05 ` rguenth at gcc dot gnu dot org
2010-05-23 20:09 ` ttsiodras at gmail dot com
2010-05-23 20:12 ` ttsiodras at gmail dot com
2010-05-23 20:37 ` rguenth at gcc dot gnu dot org
2010-05-23 20:48 ` ttsiodras at gmail dot com
2010-05-24  7:24 ` ttsiodras at gmail dot com
2010-05-24 12:18 ` rguenth at gcc dot gnu dot org
2010-05-24 12:25 ` rguenth at gcc dot gnu dot org
2010-05-24 12:35 ` rguenth at gcc dot gnu dot org
2010-05-24 12:35 ` rguenth at gcc dot gnu dot org
2010-05-24 13:41 ` ttsiodras at gmail dot com
2010-05-24 13:44 ` ttsiodras at gmail dot com
2010-05-24 13:47 ` ttsiodras at gmail dot com
2010-05-24 18:03 ` rguenth at gcc dot gnu dot org
2010-05-25  8:41 ` reichelt at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).