c++/9730: 64BIT:err in class size for dump file

michaelw@ca.ibm.com michaelw@ca.ibm.com
Mon Feb 17 19:56:00 GMT 2003


>Number:         9730
>Category:       c++
>Synopsis:       64BIT:err in class size for dump file
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 17 19:56:01 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:
a.cpp 
----------------------------------------------------------------------------
struct B {};
struct C : virtual B { int B; };

struct D : virtual B, C {
      D() {}
      int ca;
};
----------------------------------------------------------------------------

Actual Result:
------------------------------------------------
- size of class D specified as 16
in line 40 of a.cpp.class
Class D
   size=16 align=8
------------------------------------------------


Expected Behaviour:
---------------------------------------------------
- size of class D should be 24 in 64bit mode
in line 40 of a.cpp.class
Class D
   size=24 align=8
---------------------------------------------------
>How-To-Repeat:
// g++ must be a 64bit liunx compiler.  Results are okay on 32bit
g++ -fdump-class-hierarchy -c a.cpp
>Fix:

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



More information about the Gcc-bugs mailing list