aboutsummaryrefslogtreecommitdiff
path: root/gcc/alias.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/alias.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/alias.c')
-rw-r--r--gcc/alias.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index e8e3f6c..fb7919a 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -888,6 +888,7 @@ get_alias_set (tree t)
}
/* If this is a type with a known alias set, return it. */
+ gcc_checking_assert (t == TYPE_MAIN_VARIANT (t));
if (TYPE_ALIAS_SET_KNOWN_P (t))
return TYPE_ALIAS_SET (t);
@@ -1030,6 +1031,7 @@ get_alias_set (tree t)
We can not call get_alias_set (p) here as that would trigger
infinite recursion when p == t. In other cases it would just
trigger unnecesary legwork of rebuilding the pointer again. */
+ gcc_checking_assert (p == TYPE_MAIN_VARIANT (p));
if (TYPE_ALIAS_SET_KNOWN_P (p))
set = TYPE_ALIAS_SET (p);
else