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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-11 15:43:42 UTC ---
Author: jakub
Date: Fri Mar 11 15:43:37 2011
New Revision: 170874

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170874
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.

    * g++.dg/inherit/virtual8.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/inherit/virtual8.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/init.c
    trunk/gcc/testsuite/ChangeLog


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