public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/47116] New: Linking error: multiple definition of `non-virtual thunk to ...'
@ 2010-12-29 14:34 silver24k at gmail dot com
  2010-12-29 14:35 ` [Bug c++/47116] " silver24k at gmail dot com
  2011-01-08 15:17 ` silver24k at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: silver24k at gmail dot com @ 2010-12-29 14:34 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Linking error: multiple definition of `non-virtual
                    thunk to ...'
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: silver24k@gmail.com


When compiling attached sources, I get:
$ g++ -O2 -c test0.cpp
$ g++ -O2 -c test1.cpp
$ g++ -o test.exe test0.o test1.o
test1.o:test1.cpp:(.text+0x0): multiple definition of `non-virtual thunk to
FooBase::Bar()'
test0.o:test0.cpp:(.text+0x0): first defined here
collect2: ld returned 1 exit status

Changing -O2 to -O0 or -O1 does not help.

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=c:/snowfishroot/mingw/bin/../libexec/gcc/mingw32/4.6.0/lto-wrapper.exe
Target: mingw32
Configured with: ../../../gcc_trunk/configure --build=x86_64-unknown-linux-gnu
--host=mingw32 --target=mingw32 --prefix=/mingw --disable-win32-registry
--enable-shared --enable-static --enable-libgomp
--enable-version-specific-runtime-libs --with-gmp=/mingw --with-mpfr=/mingw
--with-ppl=/mingw --with-cloog=/mingw --enable-libstdcxx-debug
--with-build-time-tools=/platform/cross-on-linux/mingw --disable-nls
--with-mpc=/mingw --enable-languages=c,c++ --enable-lto --disable-plugin
--enable-checking=release --enable-sjlj-exceptions
Thread model: win32
gcc version 4.6.0 20101228 (experimental)
COMPILER_PATH=c:/snowfishroot/mingw/bin/../libexec/gcc/mingw32/4.6.0/;c:/snowfishroot/mingw/bin/../libexec/gcc/;c:/snowfishroot/mingw/bin/../lib/gcc/mingw32/4.6.0/../../../../mingw32/bin/
LIBRARY_PATH=c:/snowfishroot/mingw/bin/../lib/gcc/mingw32/4.6.0/;c:/snowfishroot/mingw/bin/../lib/gcc/;c:/snowfishroot/mingw/bin/../lib/gcc/mingw32/4.6.0/../../../../mingw32/lib/;c:/snowfishroot/mingw/bin/../lib/gcc/mingw32/4.6.0/../../../
COLLECT_GCC_OPTIONS='-v' '-o' 'test.exe' '-shared-libgcc' '-mtune=generic'
'-march=pentiumpro'
 c:/snowfishroot/mingw/bin/../libexec/gcc/mingw32/4.6.0/collect2.exe -Bdynamic
-o test.exe c:/snowfishroot/mingw/bin/../lib/gcc/mingw32/4.6.0/../../../crt2.o
c:/snowfishroot/mingw/bin/../lib/gcc/mingw32/4.6.0/crtbegin.o
-Lc:/snowfishroot/mingw/bin/../lib/gcc/mingw32/4.6.0
-Lc:/snowfishroot/mingw/bin/../lib/gcc
-Lc:/snowfishroot/mingw/bin/../lib/gcc/mingw32/4.6.0/../../../../mingw32/lib
-Lc:/snowfishroot/mingw/bin/../lib/gcc/mingw32/4.6.0/../../.. test0.o test1.o
-lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -ladvapi32
-lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex
-lmsvcrt c:/snowfishroot/mingw/bin/../lib/gcc/mingw32/4.6.0/crtend.o
test1.o:test1.cpp:(.text+0x0): multiple definition of `non-virtual thunk to
FooBase::Bar()'
test0.o:test0.cpp:(.text+0x0): first defined here
collect2: ld returned 1 exit status


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/47116] Linking error: multiple definition of `non-virtual thunk to ...'
  2010-12-29 14:34 [Bug c++/47116] New: Linking error: multiple definition of `non-virtual thunk to ...' silver24k at gmail dot com
@ 2010-12-29 14:35 ` silver24k at gmail dot com
  2011-01-08 15:17 ` silver24k at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: silver24k at gmail dot com @ 2010-12-29 14:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Yu Simin <silver24k at gmail dot com> 2010-12-29 14:35:31 UTC ---
Created attachment 22866
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22866
sources


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/47116] Linking error: multiple definition of `non-virtual thunk to ...'
  2010-12-29 14:34 [Bug c++/47116] New: Linking error: multiple definition of `non-virtual thunk to ...' silver24k at gmail dot com
  2010-12-29 14:35 ` [Bug c++/47116] " silver24k at gmail dot com
@ 2011-01-08 15:17 ` silver24k at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: silver24k at gmail dot com @ 2011-01-08 15:17 UTC (permalink / raw)
  To: gcc-bugs

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

Yu Simin <silver24k at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #2 from Yu Simin <silver24k at gmail dot com> 2011-01-08 15:12:11 UTC ---
duplicate of PR47218

*** This bug has been marked as a duplicate of bug 47218 ***


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-08 15:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-29 14:34 [Bug c++/47116] New: Linking error: multiple definition of `non-virtual thunk to ...' silver24k at gmail dot com
2010-12-29 14:35 ` [Bug c++/47116] " silver24k at gmail dot com
2011-01-08 15:17 ` silver24k at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).