public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/10893: wrong class mapping for empty bases
@ 2003-05-21 13:57 bangerth
  0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2003-05-21 13:57 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, yanliu

Synopsis: wrong class mapping for empty bases

State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Wed May 21 13:57:31 2003
State-Changed-Why:
    Fixed, according to Andrew

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10893


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

* Re: c++/10893: wrong class mapping for empty bases
@ 2003-05-21  3:06 Andrew Pinski
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Pinski @ 2003-05-21  3:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/10893; it has been noted by GNATS.

From: Andrew Pinski <pinskia@physics.uc.edu>
To: yanliu@ca.ibm.com
Cc: Andrew Pinski <pinskia@physics.uc.edu>, gcc-gnats@gcc.gnu.org
Subject: Re: c++/10893: wrong class mapping for empty bases
Date: Tue, 20 May 2003 23:01:08 -0400

 This has been fixed in 3.4 (I think 3.3 also) but only if you say that 
 you want the lasted c++ abi.
 
 3.4:
 Class D1
     size=8 align=4
     base size=8 base align=4
 D1 (0x103f240) 0
      vptridx=0 vptr=((&D1::_ZTV2D1) + 12)
    D (0x103f280) 0 nearly-empty
        primary-for D1 (0x103f240)
        subvttidx=4
      E1 (0x103f2c0) 4 empty virtual
          vbaseoffset=-12
        E (0x103f300) 4 empty
      E2 (0x103f340) 0 empty
        E (0x103f380) 0 empty
 
 
 3.4 with -fabi-version=0 aka the latest abi:
 Class D1
     size=12 align=4
     base size=8 base align=4
 D1 (0x103e240) 0
      vptridx=0 vptr=((&D1::_ZTV2D1) + 12)
    D (0x103e280) 0 nearly-empty
        primary-for D1 (0x103e240)
        subvttidx=4
      E1 (0x103e2c0) 8 empty virtual
          vbaseoffset=-12
        E (0x103e300) 12 empty
      E2 (0x103e340) 0 empty
        E (0x103e380) 0 empty
 
 
 Thanks,
 Andrew Pinski
 


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

* c++/10893: wrong class mapping for empty bases
@ 2003-05-21  2:36 yanliu
  0 siblings, 0 replies; 3+ messages in thread
From: yanliu @ 2003-05-21  2:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         10893
>Category:       c++
>Synopsis:       wrong class mapping for empty bases
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Wed May 21 02:36:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Yan Liu
>Release:        unknown-1.0
>Organization:
>Environment:
linuxppc system, version 3.2 32bit mode.
>Description:

>How-To-Repeat:
using -fdump-class-hierarchy option to get the class layout of the above testcase. You will find the empty base class  E1 and E are at offset 4 in struct D1 class layout. There is  a another data member also be mapped at the same address, which is wrong according to C++ ABI. 
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="kaka.C"
Content-Disposition: inline; filename="kaka.C"

struct E {};
struct E1: public E {};
struct E2: public E {};
struct D: public virtual E1, public E2 {
};
struct D1: public D {
	int d1;
};
D1 objd1;


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

end of thread, other threads:[~2003-05-21 13:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-21 13:57 c++/10893: wrong class mapping for empty bases bangerth
  -- strict thread matches above, loose matches on Subject: below --
2003-05-21  3:06 Andrew Pinski
2003-05-21  2:36 yanliu

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).