From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2885 invoked by alias); 5 Jul 2002 12:16:04 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 2844 invoked by uid 71); 5 Jul 2002 12:16:01 -0000 Date: Fri, 05 Jul 2002 05:16:00 -0000 Message-ID: <20020705121601.2843.qmail@sources.redhat.com> To: nathan@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Nathan Sidwell Subject: Re: c++/6831: Wrong base class alignment (nvalign vs. align) Reply-To: Nathan Sidwell X-SW-Source: 2002-07/txt/msg00188.txt.bz2 List-Id: The following reply was made to PR c++/6831; it has been noted by GNATS. From: Nathan Sidwell To: Grigory_Zagorodnev@vniief.ims.intel.com, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, nathan@gcc.gnu.org, gcc-bugs@gcc.gnu.org Cc: Subject: Re: c++/6831: Wrong base class alignment (nvalign vs. align) Date: Fri, 05 Jul 2002 13:08:23 +0100 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6831 I do not get the different layout that you describe. I do get a different layout to the one you think you should get. The layout I get accords to the ABI. Here is the -fdump-class-hierarchy output for E. I have marked the important offsets. this is with a cross compiler configured as --target=ia64-intel-unix Class E size=48 align=16 E (0x40090a40) 0 <- offsetof (E) vptridx=0 vptr=((&E::_ZTV1E) + 32) B (0x40090a80) 0 nearly-empty <- offset of (B) primary-for E (0x40090a40) subvttidx=8 A (0x40090ac0) 24 virtual canonical <- offset of A vbaseoffset=-24 D (0x40090b00) 8 <- offset of D subvttidx=16 vptridx=24 vptr=((&E::_ZTV1E) + 56) C (0x40090b40) 32 virtual canonical <- offset of C vbaseoffset=-32 Note D has a dsize of 12, and 4 bytes of tail padding. Because D is a non-pod, we can overlay that tail padding with another object. Here is the layout we should and do get for ia64 off size name 0 8 E::B::vptr 8 8 E::D::vptr 16 4 E::D::d 20 4 E::e overlayed ontop of D's tail padding 24 4 E::A 28 4 alignment padding 32 16 E::C 48 nathan -- Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC 'But that's a lie.' - 'Yes it is. What's your point?' nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org