This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/48035] [4.4 Regression] Mismatch on size of class when initializing hierarchy involving virtual inheritance and empty base classes
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 13 Oct 2011 18:03:01 +0000
- Subject: [Bug c++/48035] [4.4 Regression] Mismatch on size of class when initializing hierarchy involving virtual inheritance and empty base classes
- Auto-submitted: auto-generated
- References: <bug-48035-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48035
--- Comment #12 from Jason Merrill <jason at gcc dot gnu.org> 2011-10-13 18:03:01 UTC ---
Author: jason
Date: Thu Oct 13 18:02:53 2011
New Revision: 179937
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179937
Log:
PR c++/48035
* init.c (build_zero_init_1): Extracted from build_zero_init.
Add FIELD_SIZE argument, if non-NULL and field bit_position
as not smaller than that, don't add that field's initializer.
Pass DECL_SIZE as last argument to build_zero_init_1
for DECL_FIELD_IS_BASE fields.
(build_zero_init): Use build_zero_init_1.
Added:
branches/gcc-4_4-branch/gcc/testsuite/g++.dg/inherit/virtual8.C
Modified:
branches/gcc-4_4-branch/gcc/cp/ChangeLog
branches/gcc-4_4-branch/gcc/cp/init.c
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog