------- Comment #2 from wouter dot vermaelen at scarlet dot be 2009-11-11 18:26 ------- I (independently) found the same issue today.
I managed to reduce it to the following testcase: > cat foo.cc struct Base1 { virtual ~Base1(); }; struct Base2 { virtual ~Base2(); }; struct Foo : Base1, Base2 { virtual ~Foo(); }; Base1::~Base1() {} Base2::~Base2() {} Foo::~Foo() {} int main() { return 0; } > g++ foo.cc [works fine] > g++ -flto foo.cc /usr/bin/ld: /tmp/ccNr43fh.lto.o: in function _ZTV3Foo:ccuOnB3i.o(.gnu.linkonce.r._ZTV3Foo+0x30): error: undefined reference to '_ZThn8_N3FooD1Ev' /usr/bin/ld: /tmp/ccNr43fh.lto.o: in function _ZTV3Foo:ccuOnB3i.o(.gnu.linkonce.r._ZTV3Foo+0x38): error: undefined reference to '_ZThn8_N3FooD0Ev' collect2: ld returned 1 exit status -- wouter dot vermaelen at scarlet dot be changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wouter dot vermaelen at | |scarlet dot be http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42009