Bug 44398

Summary: lto1: internal compiler error: Segmentation fault
Product: gcc Reporter: bero
Component: ltoAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED INVALID    
Severity: normal CC: gcc-bugs
Priority: P3    
Version: 4.5.1   
Target Milestone: ---   
Host: x86_64-unknown-linux-gnu Target: x86_64-unknown-linux-gnu
Build: x86_64-unknown-linux-gnu Known to work:
Known to fail: Last reconfirmed:
Attachments: ltrace output

Description bero 2010-06-03 10:43:27 UTC
Probably introduced by the fix for bug 44385, given it happens in the same place and removing -fuse-linker-plugin "fixes" it again: With gcc 4.5.1 rev 160157, linking Qt's moc with -flto -fuse-linker-plugin results in

g++ -Wl,-rpath-link,/usr/src/ark/BUILD/qt/lib -m64 -O2 -fomit-frame-pointer -fweb -frename-registers -Wl,-O2,-z,combreloc,-z,relro,--enable-new-dtags,--hash-style=gnu -g -flto -fuse-linker-plugin -Wl,-rpath,/usr/lib64/qt4-embedded/lib -Wl,-rpath,/usr/lib64/qt4-embedded/lib -flto -fuse-linker-plugin -fwhole-program -o ../../../bin/moc release-static/moc.o release-static/preprocessor.o release-static/generator.o release-static/parser.o release-static/token.o release-static/main.o    -L/usr/src/ark/BUILD/qt/src/tools/bootstrap -lbootstrap -lz 
lto1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: g++ returned 1 exit status
/usr/bin/ld: fatal error: lto-wrapper failed
collect2: ld returned 1 exit status


I couldn't get gdb to produce relevant output for this, so I'm attaching what ltrace -f has to say just before the crash.
Comment 1 bero 2010-06-03 10:44:29 UTC
Created attachment 20816 [details]
ltrace output
Comment 2 Richard Biener 2010-06-03 11:28:16 UTC
That isn't very helpful ;)  Can you try to reproduce this with current trunk?
What version of gold are you using?

Can you produce a testcase?  Try doing an incremental link (-r), and strip
libraries and object files as much as possible while the issue still
reproduces.  Then attach preprocessed source of the remaining bits.  You
probably need to remove -fwhole-program for this to work (where the issue
then hopefully still reproduces).
Comment 3 Andrew Pinski 2012-01-10 19:00:00 UTC
No feedback in over 6 months so closing.