From afce1f578206e99e0b3a1774728304629f42ada0 Mon Sep 17 00:00:00 2001 From: jason Date: Wed, 8 Aug 2001 16:56:51 +0000 Subject: * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44720 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/alias.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gcc/alias.c') diff --git a/gcc/alias.c b/gcc/alias.c index a1204a2eac9..a79589f0dcc 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) -- cgit v1.2.1