]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR c++/48035 (Mismatch on size of class when initializing hierarchy involving...
authorJason Merrill <jason@redhat.com>
Thu, 13 Oct 2011 18:02:53 +0000 (14:02 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 13 Oct 2011 18:02:53 +0000 (14:02 -0400)
commitb01ed72c42fb20dfbe4170cc81fa99a14b35e4be
tree82366f0611e1ed08e559699dbe1f1a3c96e81b73
parent949f340c3b250950b0454094dc3dc52fa28e9fcc
re PR c++/48035 (Mismatch on size of class when initializing hierarchy involving virtual inheritance and empty base classes)

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.

From-SVN: r179937
gcc/cp/ChangeLog
gcc/cp/init.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/inherit/virtual8.C [new file with mode: 0644]