public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/8024: G++ 3.2 vtable layout of implicit destructors is not ABI compliant
@ 2002-10-10 14:54 mmitchel
0 siblings, 0 replies; 3+ messages in thread
From: mmitchel @ 2002-10-10 14:54 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, mmitchel, nobody, uday.b.ivaturi
Synopsis: G++ 3.2 vtable layout of implicit destructors is not ABI compliant
Responsible-Changed-From-To: unassigned->mmitchel
Responsible-Changed-By: mmitchel
Responsible-Changed-When: Thu Oct 10 14:54:29 2002
Responsible-Changed-Why:
I'll look into it.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8024
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c++/8024: G++ 3.2 vtable layout of implicit destructors is not ABI compliant
@ 2002-11-07 14:22 mmitchel
0 siblings, 0 replies; 3+ messages in thread
From: mmitchel @ 2002-11-07 14:22 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, mmitchel, uday.b.ivaturi
Synopsis: G++ 3.2 vtable layout of implicit destructors is not ABI compliant
State-Changed-From-To: open->closed
State-Changed-By: mmitchel
State-Changed-When: Thu Nov 7 14:22:14 2002
State-Changed-Why:
Fixed in GCC 3.3 with -fabi-version=0.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8024
^ permalink raw reply [flat|nested] 3+ messages in thread
* c++/8024: G++ 3.2 vtable layout of implicit destructors is not ABI compliant
@ 2002-09-24 11:16 uday.b.ivaturi
0 siblings, 0 replies; 3+ messages in thread
From: uday.b.ivaturi @ 2002-09-24 11:16 UTC (permalink / raw)
To: gcc-gnats
>Number: 8024
>Category: c++
>Synopsis: G++ 3.2 vtable layout of implicit destructors is not ABI compliant
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Sep 24 11:16:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: uday.b.ivaturi@intel.com
>Release: GCC 3.2
>Organization:
>Environment:
>Description:
G++ 3.2 vtable layout of implicit destructors is not ABI compliant.
Consider the following test case,
> cat t.cpp
class A {
public:
int a;
virtual int fA1() { return 1; } ;
virtual int fA2() { return 1; } ;
virtual ~A() { a = fA2(); }
} a;
class C : public virtual A {
public:
int c;
virtual int fA1() { return 34; } ;
virtual int fC1() { return 34; } ;
} c;
Its vtable layout is,
> g++ -c -fdump-class-hierarchy t.cpp
> cat t.cpp.class
Vtable for A
A::_ZTV1A: 6 entries
0 0
4 &_ZTI1A
8 A::fA1()
12 A::fA2()
16 A::~A()
20 A::~A()
Class A
size=8 align=4
A (0x40083380) 0
vptr=((&A::_ZTV1A) + 8)
Vtable for C
C::_ZTV1C: 16 entries
0 8
4 0
8 &_ZTI1C
12 C::~C()
16 C::~C()
20 C::fA1()
24 C::fC1()
28 0fffffff8
32 0
36 0fffffff8
40 0fffffff8
44 &_ZTI1C
48 C::_ZTv0_n12_N1C3fA1Ev()
52 A::fA2()
56 C::_ZTv0_n20_N1CD1Ev()
60 C::_ZTv0_n20_N1CD0Ev()
VTT for C
C::_ZTT1C: 2 entries
0 ((&C::_ZTV1C) + 12)
4 ((&C::_ZTV1C) + 48)
Class C
size=16 align=4
C (0x40083cc0) 0
vptridx=0 vptr=((&C::_ZTV1C) + 12)
A (0x40083d00) 8 virtual canonical
vptridx=4 vbaseoffset=-12 vptr=((&C::_ZTV1C) + 48)
------
Virtual base class has a virtual destructor. From the ABI: "If a class has an implicitly-defined virtual destructor, its entries come after the declared virtual function pointers." But in GCC output, the implicit destructors for class C are first in order compared to member functions.
>How-To-Repeat:
g++ -c -fdump-class-hierarchy t.cpp
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-11-07 22:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-10 14:54 c++/8024: G++ 3.2 vtable layout of implicit destructors is not ABI compliant mmitchel
-- strict thread matches above, loose matches on Subject: below --
2002-11-07 14:22 mmitchel
2002-09-24 11:16 uday.b.ivaturi
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).