summaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2007-10-23 11:20:56 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2007-10-23 11:20:56 +0000
commit90310d368fad6dde921b6a1477ea0bac387a6ca2 (patch)
treeba33e411d052656a2a413b86e640f8c544c37cda /gcc/alias.c
parent262e7125e77a10c27a727c531990389e4565db16 (diff)
downloadgcc-90310d368fad6dde921b6a1477ea0bac387a6ca2.tar.gz
alias.c (get_alias_set): For INDIRECT_REFs, deal with SSA_NAME pointers.
2007-10-23 Richard Guenther <rguenther@suse.de> * alias.c (get_alias_set): For INDIRECT_REFs, deal with SSA_NAME pointers. From-SVN: r129577
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index 6bf67f3574f..bd5c277f05a 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -525,7 +525,12 @@ get_alias_set (tree t)
/* Check for accesses through restrict-qualified pointers. */
if (INDIRECT_REF_P (inner))
{
- tree decl = find_base_decl (TREE_OPERAND (inner, 0));
+ tree decl;
+
+ if (TREE_CODE (TREE_OPERAND (inner, 0)) == SSA_NAME)
+ decl = SSA_NAME_VAR (TREE_OPERAND (inner, 0));
+ else
+ decl = find_base_decl (TREE_OPERAND (inner, 0));
if (decl && DECL_POINTER_ALIAS_SET_KNOWN_P (decl))
{