http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59516
Bug ID: 59516 Summary: [4.9 Regression] Multiple definition of `X' / of `non-virtual thunk to X' errors with LTO Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: d.g.gorbachev at gmail dot com Target: i686-w64-mingw32 Created attachment 31442 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31442&action=edit Testcase (compile with `-O2 -flto -shared') GCC 4.9.0 20131208 (experimental). /tmp/ccwAdNny.o (symbol from plugin):(.gnu.linkonce.t._ZN1S2fnEv[__ZThn8_N1S2fnEv]+0x0): multiple definition of `S::fn()' /tmp/ccwhiDw7.o (symbol from plugin):(.gnu.linkonce.t._ZN1S2fnEv[__ZThn4_N1S2fnEv]+0x0): first defined here /tmp/ccwAdNny.o (symbol from plugin):(.gnu.linkonce.t._ZN1S2fnEv[__ZThn8_N1S2fnEv]+0x0): multiple definition of `non-virtual thunk to S::fn()' /tmp/ccwhiDw7.o (symbol from plugin):(.gnu.linkonce.t._ZN1S2fnEv[__ZThn4_N1S2fnEv]+0x0): first defined here /tmp/ccwAdNny.o (symbol from plugin):(.gnu.linkonce.t._ZN1S2fnEv[__ZThn8_N1S2fnEv]+0x0): multiple definition of `non-virtual thunk to S::fn()' /tmp/ccwhiDw7.o (symbol from plugin):(.gnu.linkonce.t._ZN1S2fnEv[__ZThn4_N1S2fnEv]+0x0): first defined here collect2: error: ld returned 1 exit status