This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/35921] Con/de-structor definition fails to override dllimport declaration
- From: "tdragon at tdragon dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 May 2008 17:31:04 -0000
- Subject: [Bug target/35921] Con/de-structor definition fails to override dllimport declaration
- References: <bug-35921-14702@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from tdragon at tdragon dot net 2008-05-29 17:31 -------
Created an attachment (id=15702)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15702&action=view)
Minimal testcase for vtable issue
I'm not sure whether this is related, but the effect is similar so I'm adding
it to this same bug.
Basically, we get an undefined reference to the vtable for a dllimport-ed
struct with a single inner-defined virtual function. Again, it's something that
worked in mingw32 in previous GCC releases and fails in 4.3.0.
Command line compilation and output:
> g++ -c impoverride2.cpp
> nm impoverride2.o
00000000 b .bss
00000000 d .data
00000000 r .rdata$_ZTI3foo
00000000 r .rdata$_ZTS3foo
00000000 r .rdata$_ZTV3foo
00000000 t .text
00000000 t .text$_ZN3foo3barEv
00000000 t .text$_ZN3fooC1Ev
00000000 T __Z3depv
00000000 T __ZN3foo3barEv
00000000 T __ZN3fooC1Ev
00000000 R __ZTI3foo
00000000 R __ZTS3foo
00000000 R __ZTV3foo
U __ZTVN10__cxxabiv117__class_type_infoE
U __imp___ZTV3foo << Shouldn't be there!
> g++ -v
Using built-in specs.
Target: mingw32
Configured with: ../gcc-4.3.0/configure --prefix=/mingw --build=mingw32
--enable-languages=c,ada,c++,fortran,objc,obj-c++
--with-bugurl=http://www.tdragon.net/recentgcc/bugs.php --disable-nls
--disable-win32-registry --enable-libgomp --disable-werror --enable-threads
--disable-symvers --enable-cxx-flags='-fno-function-sections
-fno-data-sections' --enable-fully-dynamic-string
--enable-version-specific-runtime-libs --disable-sjlj-exceptions
--program-suffix=-dw2 --with-pkgversion='GCC TDM-3/DW2 for MinGW'
Thread model: win32
gcc version 4.3.0-dw2 (GCC TDM-3/DW2 for MinGW)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35921