From 74d86f4fc1c5966e88f0cf977e33bb26c0cd643e Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 20 Jun 2002 00:30:04 -0700 Subject: 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 --- gcc/alias.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gcc/alias.c') 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 (); -- cgit v1.2.1