aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2015-11-24 21:35:16 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2015-11-24 20:35:16 +0000
commitba6a6a1d44c17f25671162c00dafd9959818667f (patch)
treebfa02931487309252ffddfb0ef2cd4f62997167f /gcc/tree.c
parent0b87a9a2bd3835e62e690c8acd4bbb4b3bec27c7 (diff)
downloadgcc-ba6a6a1d44c17f25671162c00dafd9959818667f.zip
gcc-ba6a6a1d44c17f25671162c00dafd9959818667f.tar.gz
gcc-ba6a6a1d44c17f25671162c00dafd9959818667f.tar.bz2
alias.c (get_alias_set): Before checking TYPE_ALIAS_SET_KNOWN_P double check that type is main variant.
* alias.c (get_alias_set): Before checking TYPE_ALIAS_SET_KNOWN_P double check that type is main variant. * tree.c (build_variant_type_copy): Clear TYPE_ALIAS_SET when producing variant. (verify_type_variant): Verify that variants have no TYPE_ALIAS_SET_KNOWN_P set * tree-streamer-out.c (pack_ts_type_common_value_fields): Reorder streaming so constant fields come first; stream TYPE_ALIAS_SET==0 only for main variants; stream TYPE_ALIAS_SET as a bit. * tree-streamer-in.c (unpack_ts_type_common_value_fields): Update accordingly. From-SVN: r230838
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index f68a824..c8e143a 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -6727,6 +6727,8 @@ build_variant_type_copy (tree type)
/* Since we're building a variant, assume that it is a non-semantic
variant. This also propagates TYPE_STRUCTURAL_EQUALITY_P. */
TYPE_CANONICAL (t) = TYPE_CANONICAL (type);
+ /* Type variants have no alias set defined. */
+ TYPE_ALIAS_SET (t) = -1;
/* Add the new type to the chain of variants of TYPE. */
TYPE_NEXT_VARIANT (t) = TYPE_NEXT_VARIANT (m);
@@ -13074,8 +13076,12 @@ verify_type_variant (const_tree t, tree tv)
if ((!in_lto_p || !TYPE_FILE_SCOPE_P (t)) && 0)
verify_variant_match (TYPE_CONTEXT);
verify_variant_match (TYPE_STRING_FLAG);
- if (TYPE_ALIAS_SET_KNOWN_P (t) && TYPE_ALIAS_SET_KNOWN_P (tv))
- verify_variant_match (TYPE_ALIAS_SET);
+ if (TYPE_ALIAS_SET_KNOWN_P (t))
+ {
+ error ("type variant with TYPE_ALIAS_SET_KNOWN_P");
+ debug_tree (tv);
+ return false;
+ }
/* tree_type_non_common checks. */