This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/48035] [4.4/4.5/4.6 Regression] Mismatch on size of class when initializing hierarchy involving virtual inheritance and empty base classes


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48035

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-09 14:03:35 UTC ---
I think the problem is that build_zero_init isn't aware of the
DECL_FIELD_IS_BASE FIELD_DECLs and CLASSTYPE_AS_BASE stuff.  So when
simplify_aggr_init_expr decides to call build_zero_init on the
SpecificImplementation type, while the first FIELD_DECL has size 8 and its type
also size 8, the second FIELD_DECL has size 12 (CLASSTYPE_SIZE_UNIT), its type
has size 24 and thus what build_zero_init returns on the subtype isn't directly
usable as ctor of the outer type.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]