[Bug lto/46376] LTO, MinGW and virtual base classes don't work together
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46376 --- Comment #2 from Kai Tietz ktietz at gcc dot gnu.org 2010-11-12 09:06:40 UTC --- Author: ktietz Date: Fri Nov 12 09:06:37 2010 New Revision: 166645 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=166645 Log: 2010-11-11 Rodrigo Rivas Costa rodrigorivasco...@gmail.com PR lto/46376 * lto-symtab.c (lto_symtab_resolve_replaceable_p): Use DECL_ONE_ONLY. Modified: trunk/gcc/ChangeLog trunk/gcc/lto-symtab.c
[Bug lto/46376] LTO, MinGW and virtual base classes don't work together
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46376 Kai Tietz ktietz at gcc dot gnu.org changed: What|Removed |Added CC||gordon.magnusson at gmail ||dot com --- Comment #3 from Kai Tietz ktietz at gcc dot gnu.org 2010-11-12 09:31:39 UTC --- *** Bug 45343 has been marked as a duplicate of this bug. ***
[Bug lto/46376] LTO, MinGW and virtual base classes don't work together
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46376 Ozkan Sezer sezeroz at gmail dot com changed: What|Removed |Added CC||sezeroz at gmail dot com --- Comment #4 from Ozkan Sezer sezeroz at gmail dot com 2010-11-12 09:32:43 UTC --- Will the 4.5 branch fixed? (at least one of PR 45343 or PR 45759 was reported against 4.5.)
[Bug lto/46376] LTO, MinGW and virtual base classes don't work together
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46376 Kai Tietz ktietz at gcc dot gnu.org changed: What|Removed |Added CC||t7 at gmail dot com --- Comment #5 from Kai Tietz ktietz at gcc dot gnu.org 2010-11-12 09:34:21 UTC --- *** Bug 45759 has been marked as a duplicate of this bug. ***
[Bug lto/46376] LTO, MinGW and virtual base classes don't work together
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46376 Kai Tietz ktietz at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC||ktietz at gcc dot gnu.org Resolution||FIXED --- Comment #6 from Kai Tietz ktietz at gcc dot gnu.org 2010-11-12 09:35:55 UTC --- Fixed by revision 166645 on trunk (4.6)
[Bug lto/46376] LTO, MinGW and virtual base classes don't work together
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46376 --- Comment #1 from Rodrigo Rivas rodrigorivascosta at gmail dot com 2010-11-08 17:07:11 UTC --- Sorry for the previous empty body... my dog ate my keyboard ;-) Anyway, the following code fails when compiled with MinGW: $ i686-mingw32msvc-g++ -v Using built-in specs. COLLECT_GCC=i686-mingw32msvc-g++ COLLECT_LTO_WRAPPER=/home/rodrigo/local/mingw/libexec/gcc/i686-mingw32msvc/4.6.0/lto-wrapper Target: i686-mingw32msvc Configured with: ../configure --prefix=/home/rodrigo/local/mingw --target=i686-mingw32msvc --build=i686-linux --with-sysroot=/home/rodrigo/local --enable-lto --enable-languages=c,c++,lto --enable-multilib=no --with-system-zlib=yes --enable-threads --disable-nls --with-arch-32=i686 --disable-sjlj-exceptions Thread model: win32 gcc version 4.6.0 20101108 (experimental) (GCC) *** File: test.h #ifndef TEST_H_INCLUDED #define TEST_H_INCLUDED struct VBase { virtual ~VBase() { } }; struct MyClass : virtual public VBase { }; #endif /* TEST_H_INCLUDED */ *** File: test.cpp #include test.h int main() { MyClass x; return 0; } *** File: foo.cpp #include test.h int main() { MyClass x; return 0; } *** File: bar.cpp #include test.h int bar() { MyClass x; return 0; } $ i686-mingw32msvc-g++ -flto *.cpp test.h:11:8: error: '_ZTv0_n12_N7MyClassD1Ev' has already been defined test.h:11:8: note: previously defined here test.h:11:8: error: '_ZTv0_n12_N7MyClassD0Ev' has already been defined test.h:11:8: note: previously defined here lto-wrapper: i686-mingw32msvc-g++ returned 1 exit status collect2: lto-wrapper returned 1 exit status However, with a native build of the exactly same GCC revision it compiles and links correctly. This *may* be a duplicate of Bug 45343. Regards. Rodrigo