re PR c++/3820 (GCC 3.0 crashes with empty base class)
authorNathan Sidwell <nathan@codesourcery.com>
Tue, 7 Aug 2001 13:57:06 +0000 (13:57 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Tue, 7 Aug 2001 13:57:06 +0000 (13:57 +0000)
commit0830ae44cd7f243964cf767561525e0ba194676f
treebe17021c95979d0552d64010022af0cefd41ff1d
parent24a285841212403389646af2198d1a34fd0b01e6
re PR c++/3820 (GCC 3.0 crashes with empty base class)

cp:
PR c++/3820
Stop using TYPE_NONCOPIED_PARTS.
* call.c (build_over_call): Be careful when copy constructing
or assigning to an empty class.
* class.c (check_bases_and_members): It has a
COMPLEX_ASSIGN_REF if it has a vptr.
(layout_class_type): Don't add empty class padding to
TYPE_NONCOPIED_PARTS.
(finish_struct_1): Don't add the VFIELD either.
* cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
initialization.
testsuite:
* g++.dg/abi/empty4.C: New test.

From-SVN: r44691
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/abi/empty4.C [new file with mode: 0644]