summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/alias.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc/alias.c')
-rw-r--r--contrib/gcc/alias.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/gcc/alias.c b/contrib/gcc/alias.c
index c5a6265..6d4104e 100644
--- a/contrib/gcc/alias.c
+++ b/contrib/gcc/alias.c
@@ -564,6 +564,14 @@ get_alias_set (t)
and references to functions, but that's different.) */
else if (TREE_CODE (t) == FUNCTION_TYPE)
set = 0;
+
+ /* Unless the language specifies otherwise, let vector types alias
+ their components. This avoids some nasty type punning issues in
+ normal usage. And indeed lets vectors be treated more like an
+ array slice. */
+ else if (TREE_CODE (t) == VECTOR_TYPE)
+ set = get_alias_set (TREE_TYPE (t));
+
else
/* Otherwise make a new alias set for this type. */
set = new_alias_set ();
OpenPOWER on IntegriCloud