]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cp/class.c
re PR c++/13387 (assignment to base class corrupts subclass)
authorNathan Sidwell <nathan@codesourcery.com>
Tue, 16 Dec 2003 10:08:43 +0000 (10:08 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Tue, 16 Dec 2003 10:08:43 +0000 (10:08 +0000)
commita0c68737027348fb9ae1ff4a5a33a10d269962bb
treecdb6bff3438c48d90d9bc3062e8e3f8e2f8a81f6
parent0f30f285e44b335cef60431f418bda986f47df35
re PR c++/13387 (assignment to base class corrupts subclass)

cp:
PR c++/13387
* class.c (finish_struct_1): Compute mode and alias set for
CLASSTYPE_AS_BASE.
* call.c (build_over_call): Use CLASSTYPE_AS_BASE for trivial
assignment of a class, as necessary.
* cp-lang.c (cxx_get_alias_set): The alias set as a base is the
same as for the complete type.
testsuite:
PR c++/13387
* g++.dg/expr/assign1.C: New test.

From-SVN: r74683
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/class.c
gcc/cp/cp-lang.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/expr/assign1.C [new file with mode: 0644]