aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2019-06-27 14:07:43 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2019-06-27 12:07:43 +0000
commita0276c00934da47fa511aa52e1973b68ffd8b2ab (patch)
tree665e4f690d6caafce10b0ade27ecfeef5909742f /gcc/cp/class.c
parentef874db611879d5004e1d834543e55d31f2bfe1c (diff)
downloadgcc-a0276c00934da47fa511aa52e1973b68ffd8b2ab.zip
gcc-a0276c00934da47fa511aa52e1973b68ffd8b2ab.tar.gz
gcc-a0276c00934da47fa511aa52e1973b68ffd8b2ab.tar.bz2
class.c (layout_class_type): Set TYPE_CXX_ODR_P for as-base type copy.
* class.c (layout_class_type): Set TYPE_CXX_ODR_P for as-base type copy. * ipa-devirt.c (odr_type_d): Add tbaa_enabled flag. (add_type_duplicate): When odr hash is not allocated, to nothing. (odr_based_tbaa_p): New function. (set_type_canonical_for_odr_type): New function. * ipa-utils.h (enable_odr_based_tbaa, odr_based_tbaa_p, set_type_canonical_for_odr_type): New. * tree.c (gimple_canonical_types_compatible_p): ODR types with ODR based TBAA are not equivalent to non-ODR types. * lto-common.c: Include demangle.h and tree-pretty-print.h (type_streaming_finished): New static var. (gimple_register_canonical_type_1): Return updated hash; handle ODR types. (iterative_hash_canonical_type): Update use of gimple_register_canonical_type_1. * g++.dg/lto/alias-2_0.C: New testcase. * g++.dg/lto/alias-2_1.C: New testcase. From-SVN: r272749
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 18e7db0..73291b3 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -6393,6 +6393,7 @@ layout_class_type (tree t, tree *virtuals_p)
SET_TYPE_ALIGN (base_t, rli->record_align);
TYPE_USER_ALIGN (base_t) = TYPE_USER_ALIGN (t);
TYPE_TYPELESS_STORAGE (base_t) = TYPE_TYPELESS_STORAGE (t);
+ TYPE_CXX_ODR_P (base_t) = TYPE_CXX_ODR_P (t);
/* Copy the non-static data members of T. This will include its
direct non-virtual bases & vtable. */