aboutsummaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index 694498ab55a..09ec775c5d0 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -691,7 +691,14 @@ get_alias_set (tree t)
requires structural comparisons to identify compatible types
use alias set zero. */
if (TYPE_STRUCTURAL_EQUALITY_P (t))
- return 0;
+ {
+ /* Allow the language to specify another alias set for this
+ type. */
+ set = lang_hooks.get_alias_set (t);
+ if (set != -1)
+ return set;
+ return 0;
+ }
t = TYPE_CANONICAL (t);
/* Canonical types shouldn't form a tree nor should the canonical
type require structural equality checks. */