diff options
author | Richard Henderson <rth@redhat.com> | 2002-06-20 00:30:04 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-06-20 00:30:04 -0700 |
commit | 74d86f4fc1c5966e88f0cf977e33bb26c0cd643e (patch) | |
tree | 0c4e881b9c304c27324e19124ed29268823cef27 /gcc/alias.c | |
parent | 3b4008995c857e733ea4d998f1228acacc13dafe (diff) | |
download | gcc-74d86f4fc1c5966e88f0cf977e33bb26c0cd643e.tar.gz |
c-common.c (c_common_get_alias_set): Correctly handle characters.
* c-common.c (c_common_get_alias_set): Correctly handle characters.
Rearrange order of expressions; don't handle vectors here.
* alias.c (get_alias_set): Let vectors match their components.
From-SVN: r54821
Diffstat (limited to 'gcc/alias.c')
-rw-r--r-- | gcc/alias.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/alias.c b/gcc/alias.c index d892926b453..2e6a2b084e1 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -575,6 +575,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 (); |