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

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).