The C++ testcase that I am about to attach compiles and links well
without LTO at all optimizations levels.  Unfortunately, whenever I
try to compile it with LTO (at any optimization level including zero),
I get the following link error:

mjam...@host:~/gcc/fail$ ~/gcc/inst/trunk/bin/g++ -flto testcase.cpp 
/tmp/ccxMi1Vq.lto.o:(.rodata._ZTV1B[_ZTV1B]+0x18): undefined reference to
`_ZThn16_N1B3fooEi'
collect2: ld returned 1 exit status

When I remove the first ancestor of class B from the list of
ancestors, the testcase links and works fine.

I get a very similar error on x86_64 too.  On both machines the used
compiler is pristine trunk revision 154038.


-- 
           Summary: LTO unable to link in presence of multiple inheritance
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jamborm at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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

Reply via email to