aboutsummaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index 451f8f3dee5..1e4c4d19e69 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -769,6 +769,10 @@ reference_alias_ptr_type_1 (tree *t)
tree
reference_alias_ptr_type (tree t)
{
+ /* If the frontend assigns this alias-set zero, preserve that. */
+ if (lang_hooks.get_alias_set (t) == 0)
+ return ptr_type_node;
+
tree ptype = reference_alias_ptr_type_1 (&t);
/* If there is a given pointer type for aliasing purposes, return it. */
if (ptype != NULL_TREE)