diff options
author | Jason Merrill <jason@redhat.com> | 2001-08-08 12:56:51 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2001-08-08 12:56:51 -0400 |
commit | 5755cd3808b7ffb637991e6537a69d1bdae4cffb (patch) | |
tree | aebee6fdf45e18a5266d6c228d8bc47d74e8f54e /gcc/alias.c | |
parent | 0f0138b6b2669803f26f9a19adce9da9c8eb9911 (diff) | |
download | gcc-5755cd3808b7ffb637991e6537a69d1bdae4cffb.zip gcc-5755cd3808b7ffb637991e6537a69d1bdae4cffb.tar.gz gcc-5755cd3808b7ffb637991e6537a69d1bdae4cffb.tar.bz2 |
alias.c (get_alias_set): Return a previously calculated alias set for a VAR_DECL.
* alias.c (get_alias_set): Return a previously calculated
alias set for a VAR_DECL.
* function.c (gen_mem_addressof): Calculate the alias set before
touching the RTL.
From-SVN: r44720
Diffstat (limited to 'gcc/alias.c')
-rw-r--r-- | gcc/alias.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/alias.c b/gcc/alias.c index a1204a2..a79589f 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -526,6 +526,13 @@ get_alias_set (t) return 0; } + /* If we've already determined the alias set for this decl, just + return it. This is necessary for C++ anonymous unions, whose + component variables don't look like union members (boo!). */ + if (TREE_CODE (t) == VAR_DECL + && DECL_RTL_SET_P (t) && GET_CODE (DECL_RTL (t)) == MEM) + return MEM_ALIAS_SET (DECL_RTL (t)); + /* Give the language another chance to do something special. */ if (orig_t != t && (set = lang_get_alias_set (t)) != -1) |