public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Nathan Sidwell <nathan@codesourcery.com>
To: nathan@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: c++/6831: Wrong base class alignment (nvalign vs. align)
Date: Fri, 05 Jul 2002 05:16:00 -0000	[thread overview]
Message-ID: <20020705121601.2843.qmail@sources.redhat.com> (raw)

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

From: Nathan Sidwell <nathan@codesourcery.com>
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


             reply	other threads:[~2002-07-05 12:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-05  5:16 Nathan Sidwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-07-05  5:17 nathan
2002-07-03 13:04 nathan
2002-05-27  4:26 Grigory_Zagorodnev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020705121601.2843.qmail@sources.redhat.com \
    --to=nathan@codesourcery.com \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nathan@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).