public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug lto/43342] New: lto1: internal compiler error: failed to reclaim unneeded function @ 2010-03-12 10:03 pluto at agmk dot net 2010-03-12 10:05 ` [Bug lto/43342] " pluto at agmk dot net ` (6 more replies) 0 siblings, 7 replies; 8+ messages in thread From: pluto at agmk dot net @ 2010-03-12 10:03 UTC (permalink / raw) To: gcc-bugs here's a simple lto test on object with virtual methods: $ LANG=C make clean all CPPFLAGS=-DCRASH rm -f *.o *.s *.ii m g++-4.5 -Wall -g2 -O3 -DCRASH a.cpp -c -flto g++-4.5 -Wall -g2 -O3 -DCRASH m.cpp -c -flto g++-4.5 -Wall -g2 -O3 -DCRASH a.o m.o -o m -fwhopr --save-temps -fverbose-asm __base_dtor /6(-1) @0x7f82e673dea0 (clone of __base_dtor /3) availability:not_available (25 after inlining) (7 after inlining) needed address_taken body externally_visible finalized called by: main/1 calls: lto1: internal compiler error: failed to reclaim unneeded function Please submit a full bug report, with preprocessed source if appropriate. another variant of testcase with dynamic object allocation compiles but virtual calls aren't optimized. $ LANG=C make clean all rm -f *.o *.s *.ii m g++-4.5 -Wall -g2 -O3 a.cpp -c -flto g++-4.5 -Wall -g2 -O3 m.cpp -c -flto g++-4.5 -Wall -g2 -O3 a.o m.o -o m -fwhopr --save-temps -fverbose-asm m_a.wpa.s fragments: indirect foo() call not optimized. movq $_ZTV1X+16, (%rax) call *_ZTV1X+32(%rip) bar() call optimized :) movq %rbp, %rsi movl $.LC1, %edi xorl %eax, %eax call printf indirect destructor call not optimized. movq (%rbx), %rax movq %rbx, %rdi call *8(%rax) -- Summary: lto1: internal compiler error: failed to reclaim unneeded function Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pluto at agmk dot net GCC build triplet: x86_64-gnu-linux GCC host triplet: x86_64-gnu-linux GCC target triplet: x86_64-gnu-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43342 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug lto/43342] lto1: internal compiler error: failed to reclaim unneeded function 2010-03-12 10:03 [Bug lto/43342] New: lto1: internal compiler error: failed to reclaim unneeded function pluto at agmk dot net @ 2010-03-12 10:05 ` pluto at agmk dot net 2010-03-12 10:12 ` pluto at agmk dot net ` (5 subsequent siblings) 6 siblings, 0 replies; 8+ messages in thread From: pluto at agmk dot net @ 2010-03-12 10:05 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from pluto at agmk dot net 2010-03-12 10:05 ------- Created an attachment (id=20093) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20093&action=view) testcase. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43342 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug lto/43342] lto1: internal compiler error: failed to reclaim unneeded function 2010-03-12 10:03 [Bug lto/43342] New: lto1: internal compiler error: failed to reclaim unneeded function pluto at agmk dot net 2010-03-12 10:05 ` [Bug lto/43342] " pluto at agmk dot net @ 2010-03-12 10:12 ` pluto at agmk dot net 2010-03-12 11:23 ` rguenth at gcc dot gnu dot org ` (4 subsequent siblings) 6 siblings, 0 replies; 8+ messages in thread From: pluto at agmk dot net @ 2010-03-12 10:12 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from pluto at agmk dot net 2010-03-12 10:11 ------- i should mention that at -O2 with object allocated on *stack* lto does a nice job and optimize indirect calls in main(): call _ZN1X3fooEv (...) call _ZN1X3barEv (...) call _ZN1XD1Ev with dynamic allocation there's no progress. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43342 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug lto/43342] lto1: internal compiler error: failed to reclaim unneeded function 2010-03-12 10:03 [Bug lto/43342] New: lto1: internal compiler error: failed to reclaim unneeded function pluto at agmk dot net 2010-03-12 10:05 ` [Bug lto/43342] " pluto at agmk dot net 2010-03-12 10:12 ` pluto at agmk dot net @ 2010-03-12 11:23 ` rguenth at gcc dot gnu dot org 2010-03-14 23:34 ` astrange at ithinksw dot com ` (3 subsequent siblings) 6 siblings, 0 replies; 8+ messages in thread From: rguenth at gcc dot gnu dot org @ 2010-03-12 11:23 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from rguenth at gcc dot gnu dot org 2010-03-12 11:23 ------- I'm not sure you are supposed to mix -flto and -fwhopr (though it probably just works). This is btw the most prominent ICE I see when building SPEC with -fwhopr and checking enabled. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu dot | |org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |lto Last reconfirmed|0000-00-00 00:00:00 |2010-03-12 11:23:46 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43342 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug lto/43342] lto1: internal compiler error: failed to reclaim unneeded function 2010-03-12 10:03 [Bug lto/43342] New: lto1: internal compiler error: failed to reclaim unneeded function pluto at agmk dot net ` (2 preceding siblings ...) 2010-03-12 11:23 ` rguenth at gcc dot gnu dot org @ 2010-03-14 23:34 ` astrange at ithinksw dot com 2010-03-15 11:28 ` pluto at agmk dot net ` (2 subsequent siblings) 6 siblings, 0 replies; 8+ messages in thread From: astrange at ithinksw dot com @ 2010-03-14 23:34 UTC (permalink / raw) To: gcc-bugs ------- Comment #4 from astrange at ithinksw dot com 2010-03-14 23:33 ------- This happens building ffmpeg --enable-shared with -fwhopr. I can make a testcase out of that if needed. -- astrange at ithinksw dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |astrange at ithinksw dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43342 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug lto/43342] lto1: internal compiler error: failed to reclaim unneeded function 2010-03-12 10:03 [Bug lto/43342] New: lto1: internal compiler error: failed to reclaim unneeded function pluto at agmk dot net ` (3 preceding siblings ...) 2010-03-14 23:34 ` astrange at ithinksw dot com @ 2010-03-15 11:28 ` pluto at agmk dot net 2010-04-26 11:32 ` rguenth at gcc dot gnu dot org 2010-04-26 12:42 ` hubicka at gcc dot gnu dot org 6 siblings, 0 replies; 8+ messages in thread From: pluto at agmk dot net @ 2010-03-15 11:28 UTC (permalink / raw) To: gcc-bugs ------- Comment #5 from pluto at agmk dot net 2010-03-15 11:28 ------- (In reply to comment #3) > I'm not sure you are supposed to mix -flto and -fwhopr (though it probably > just works). This is btw the most prominent ICE I see when building SPEC > with -fwhopr and checking enabled. mixing -flto/-fwhopr is unnecessary. pure -fwhopr is enough to reproduce an ICE. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43342 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug lto/43342] lto1: internal compiler error: failed to reclaim unneeded function 2010-03-12 10:03 [Bug lto/43342] New: lto1: internal compiler error: failed to reclaim unneeded function pluto at agmk dot net ` (4 preceding siblings ...) 2010-03-15 11:28 ` pluto at agmk dot net @ 2010-04-26 11:32 ` rguenth at gcc dot gnu dot org 2010-04-26 12:42 ` hubicka at gcc dot gnu dot org 6 siblings, 0 replies; 8+ messages in thread From: rguenth at gcc dot gnu dot org @ 2010-04-26 11:32 UTC (permalink / raw) To: gcc-bugs ------- Comment #6 from rguenth at gcc dot gnu dot org 2010-04-26 11:32 ------- The problem no longer occurs. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Target Milestone|--- |4.5.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43342 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug lto/43342] lto1: internal compiler error: failed to reclaim unneeded function 2010-03-12 10:03 [Bug lto/43342] New: lto1: internal compiler error: failed to reclaim unneeded function pluto at agmk dot net ` (5 preceding siblings ...) 2010-04-26 11:32 ` rguenth at gcc dot gnu dot org @ 2010-04-26 12:42 ` hubicka at gcc dot gnu dot org 6 siblings, 0 replies; 8+ messages in thread From: hubicka at gcc dot gnu dot org @ 2010-04-26 12:42 UTC (permalink / raw) To: gcc-bugs ------- Comment #7 from hubicka at gcc dot gnu dot org 2010-04-26 12:41 ------- -fwhopr and -flto are intended to be interchangeable at link time. So it does not matter with what flag you build the .o objects. The problem was fixed by the clone streaming fix I submitted last week. Honza -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43342 ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-04-26 12:42 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-03-12 10:03 [Bug lto/43342] New: lto1: internal compiler error: failed to reclaim unneeded function pluto at agmk dot net 2010-03-12 10:05 ` [Bug lto/43342] " pluto at agmk dot net 2010-03-12 10:12 ` pluto at agmk dot net 2010-03-12 11:23 ` rguenth at gcc dot gnu dot org 2010-03-14 23:34 ` astrange at ithinksw dot com 2010-03-15 11:28 ` pluto at agmk dot net 2010-04-26 11:32 ` rguenth at gcc dot gnu dot org 2010-04-26 12:42 ` hubicka 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).