This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47218] New: [4.6.0 regression] C++ multiple definitions of non-virtual thunk problem
- From: "davek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 7 Jan 2011 18:11:33 +0000
- Subject: [Bug c++/47218] New: [4.6.0 regression] C++ multiple definitions of non-virtual thunk problem
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47218
Summary: [4.6.0 regression] C++ multiple definitions of
non-virtual thunk problem
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: davek@gcc.gnu.org
Sometime between 2010-12-22 and rev.167484, something changed in the behaviour
of the C++ compiler w.r.t the way it handles non-virtual thunks. I have just
discovered this while working on a patch for PR43601; a compiler built from
trunk on the earlier date reproduces the problem described there, ending in an
out-of-memory error during the final link:
Creating library file:
/tmp/wx/obj-x-ming-new/lib/libwx_mswd_core-2.8.dll.a/opt/
mingw-new/lib/gcc/i686-pc-mingw32/4.6.0/../../../../i686-pc-mingw32/bin/ld:
fina
l link failed: Memory exhausted
collect2: ld returned 1 exit status
... whereas a compiler built from r.167484 emits a whole lot of
multiple-definition errors, and stops before trying to complete the link:
Creating library file:
/tmp/wx/obj-x-ming-clean/lib/libwx_based-2.8.dll.abasedll_wfstream.o:/tmp/wx/wxWidgets-2.8.11/src/common/wfstream.cpp:407:
multiple definition of `non-virtual thunk to wxFFileStream::~wxFFileStream()'
basedll_filesys.o:/tmp/wx/wxWidgets-2.8.11/src/common/filesys.cpp:697: first
defined here
basedll_wfstream.o:/tmp/wx/wxWidgets-2.8.11/src/common/wfstream.cpp:407:
multiple definition of `non-virtual thunk to wxFFileStream::~wxFFileStream()'
basedll_filesys.o:/tmp/wx/wxWidgets-2.8.11/src/common/filesys.cpp:697: first
defined here
basedll_wfstream.o:/tmp/wx/wxWidgets-2.8.11/src/common/wfstream.cpp:407:
multiple definition of `non-virtual thunk to wxFileStream::~wxFileStream()'
basedll_filesys.o:/tmp/wx/wxWidgets-2.8.11/src/common/filesys.cpp:697: first
defined here
basedll_wfstream.o:/tmp/wx/wxWidgets-2.8.11/src/common/wfstream.cpp:407:
multiple definition of `non-virtual thunk to wxFileStream::~wxFileStream()'
basedll_filesys.o:/tmp/wx/wxWidgets-2.8.11/src/common/filesys.cpp:697: first
defined here
basedll_zipstrm.o:/tmp/wx/wxWidgets-2.8.11/src/common/zipstrm.cpp:2423:
multiple definition of `non-virtual thunk to wxFFileStream::~wxFFileStream()'
basedll_filesys.o:/tmp/wx/wxWidgets-2.8.11/src/common/filesys.cpp:697: first
defined here
basedll_zipstrm.o:/tmp/wx/wxWidgets-2.8.11/src/common/zipstrm.cpp:2423:
multiple definition of `non-virtual thunk to wxFFileStream::~wxFFileStream()'
basedll_filesys.o:/tmp/wx/wxWidgets-2.8.11/src/common/filesys.cpp:697: first
defined here
basedll_zipstrm.o:/tmp/wx/wxWidgets-2.8.11/src/common/zipstrm.cpp:2423:
multiple definition of `non-virtual thunk to wxFileStream::~wxFileStream()'
basedll_filesys.o:/tmp/wx/wxWidgets-2.8.11/src/common/filesys.cpp:697: first
defined here
basedll_zipstrm.o:/tmp/wx/wxWidgets-2.8.11/src/common/zipstrm.cpp:2423:
multiple definition of `non-virtual thunk to wxFileStream::~wxFileStream()'
basedll_filesys.o:/tmp/wx/wxWidgets-2.8.11/src/common/filesys.cpp:697: first
defined here
basedll_registry.o:/tmp/wx/wxWidgets-2.8.11/src/msw/registry.cpp:1428: multiple
definition of `non-virtual thunk to wxFFileStream::~wxFFileStream()'
basedll_filesys.o:/tmp/wx/wxWidgets-2.8.11/src/common/filesys.cpp:697: first
defined here
basedll_registry.o:/tmp/wx/wxWidgets-2.8.11/src/msw/registry.cpp:1428: multiple
definition of `non-virtual thunk to wxFFileStream::~wxFFileStream()'
basedll_filesys.o:/tmp/wx/wxWidgets-2.8.11/src/common/filesys.cpp:697: first
defined here
basedll_registry.o:/tmp/wx/wxWidgets-2.8.11/src/msw/registry.cpp:1428: multiple
definition of `non-virtual thunk to wxFileStream::~wxFileStream()'
basedll_filesys.o:/tmp/wx/wxWidgets-2.8.11/src/common/filesys.cpp:697: first
defined here
basedll_registry.o:/tmp/wx/wxWidgets-2.8.11/src/msw/registry.cpp:1428: multiple
definition of `non-virtual thunk to wxFileStream::~wxFileStream()'
basedll_filesys.o:/tmp/wx/wxWidgets-2.8.11/src/common/filesys.cpp:697: first
defined here
collect2: ld returned 1 exit status
In both cases the build was configured with a cygwin-x-mingw cross compiler
using the same command line:
$ /tmp/wx/wxWidgets-2.8.11/configure --with-msw --enable-debug
--enable-debug_gdb --enable-shared 2>&1 --host=i686-pc-mingw32
More once I've diagnosed what's going on in some of the generated object files.
I've marked this major as it could easily affect a whole lot of c++ library
builds, but may reduce that severity if it turns out to be something unusual
that wx is doing. However it's still a regression.