summaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-07 11:13:54 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-07 11:13:54 +0000
commit90b3057739e3ecef3cfb8fe0732ada4c407f788b (patch)
treeef73e08c581a7b17aa02f7f5b1d52c00bd9101c1 /gcc/alias.c
parent564061e741bd6431d9214d506cfbbf676d3f4404 (diff)
downloadgcc-90b3057739e3ecef3cfb8fe0732ada4c407f788b.tar.gz
* alias.c (get_alias_set): Return a previously calculated
alias set for a VAR_DECL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44683 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index e7417183c21..a529a01cfa6 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -527,6 +527,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)