public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: lei@ca.ibm.com
To: gcc-gnats@gcc.gnu.org
Cc: michaelw@ca.ibm.com
Subject: c++/9734: nearly empty-class not recognized in dump file
Date: Mon, 17 Feb 2003 22:26:00 -0000	[thread overview]
Message-ID: <20030217221604.16052.qmail@sources.redhat.com> (raw)


>Number:         9734
>Category:       c++
>Synopsis:       nearly empty-class not recognized in dump file
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 17 22:26:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Lei Huang
>Release:        GCC Version: 3.2.0
>Organization:
>Environment:
System Type:
Linux Version 2.4.19 SuSE SLES 8 (ppc) - Kernel 2.4.19-ul1-ppc64-SMP (36).
GNU assembler version 2.12.90.0.15 (powerpc-suse-linux) using BFD version 2.12.9
0.0.15 20020717 (SuSE)


Options given when GCC was configured/built:
Configured with: /usr/src/packages/BUILD/cross-ppc64-gcc-3.2/gcc-3.2/configure -
-enable-languages=c,c++,f77 --prefix=/opt/cross --host=powerpc-suse-linux --targ
et=powerpc64-linux --enable-threads=posix --disable-nls --enable-shared --with-h
eaders=/usr/src/packages/BUILD/cross-ppc64-gcc-3.2/include-ppc64-glibc-2.2.5
Thread model: posix
gcc version 3.2
>Description:
nearly empty-class D not identified in dump class hierarchy file.

Sourc code for a.cpp:
------------------------------------------------
struct A {
        static int aval;
};
int A::aval=0;

struct B : A {};
struct C : A {};

struct D : B, C {
        virtual void v1(){};
};

D d;
------------------------------------------------

Actual class hierarchy for D (within a.cpp.class):
------------------------------------------------
Class D
   size=8 align=4
D (0x40092c40) 0
    vptr=((&D::_ZTV1D) + 8)
  B (0x40092c80) 0 empty
    A (0x40092cc0) 0 empty
  C (0x40092d00) 4 empty
    A (0x40092d40) 4 empty
------------------------------------------------

Expected class hierarchy for D (within a.cpp.class):
------------------------------------------------
Class D
   size=8 align=4
D (0x00000000) 0 nearly-empty
    vptr=((&D::_ZTV1D) + 8)
  B (0x00000000) 0 empty
    A (0x00000000) 0 empty
  C (0x00000000) 4 empty
    A (0x00000000) 4 empty
------------------------------------------------
>How-To-Repeat:
g++ -fdump-class-hierarchy -c a.cpp
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


                 reply	other threads:[~2003-02-17 22:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20030217221604.16052.qmail@sources.redhat.com \
    --to=lei@ca.ibm.com \
    --cc=gcc-gnats@gcc.gnu.org \
    --cc=michaelw@ca.ibm.com \
    /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).