For the code listed below, GCC 4.0 (20041010) emits duplicated virtual
destructor thunk, so assembler fails to compile.
The size of c3::m member does matter there - test fails with magic value
0x3fffd or above and passes with any value below.
$ cat go.cpp
struct c0 {
virtual void foo(){};
};
struct c1 {
virtual ~c1(){};
};
struct c2 : virtual c1 { };
struct c3 {
char m[0x3fffd];
};
struct c4 : c0, c3, c2 {
c4();
};
c4::c4() { };
class c5 : virtual c4 {};
class c6 : c4 {};
$ g++ go.cpp
/tmp/cchxBAaw.s: Assembler messages:
/tmp/cchxBAaw.s:631: Error: symbol `_ZTh262140_N2c4D1Ev' is already defined
/tmp/cchxBAaw.s:650: Error: symbol `_ZTh262140_N2c4D1Ev' is already defined
/tmp/cchxBAaw.s:721: Error: symbol `_ZTh262140_N2c4D0Ev' is already defined
/tmp/cchxBAaw.s:740: Error: symbol `_ZTh262140_N2c4D0Ev' is already defined
--
Summary: Duplicated thunk with a huge member in the hierarchy
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: grigory dot zagorodnev at intel dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-redhat-linux
GCC host triplet: i686-redhat-linux
GCC target triplet: i686-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18143