aboutsummaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2009-11-01 22:12:07 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2009-11-01 22:12:07 +0000
commitebcc3d93d863c046375534bd8d7526472cd4e239 (patch)
tree62f23c951cc8e561a8dda480d655b8c2be82797e /gcc/alias.c
parent958dd42b03f9754d12fd247bae52a1871c087237 (diff)
downloadgcc-ebcc3d93d863c046375534bd8d7526472cd4e239.zip
gcc-ebcc3d93d863c046375534bd8d7526472cd4e239.tar.gz
gcc-ebcc3d93d863c046375534bd8d7526472cd4e239.tar.bz2
tree.def (TARGET_MEM_REF): Update comment.
* tree.def (TARGET_MEM_REF): Update comment. * alias.c (get_alias_set): Retrieve the original memory reference for a TARGET_MEM_REF before proceeding. From-SVN: r153796
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 1d4290f..cdfa6d2 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -640,7 +640,7 @@ get_alias_set (tree t)
aren't types. */
if (! TYPE_P (t))
{
- tree inner = t;
+ tree inner;
/* Remove any nops, then give the language a chance to do
something with this tree before we look at it. */
@@ -649,8 +649,13 @@ get_alias_set (tree t)
if (set != -1)
return set;
+ /* Retrieve the original memory reference if needed. */
+ if (TREE_CODE (t) == TARGET_MEM_REF)
+ t = TMR_ORIGINAL (t);
+
/* First see if the actual object referenced is an INDIRECT_REF from a
restrict-qualified pointer or a "void *". */
+ inner = t;
while (handled_component_p (inner))
{
inner = TREE_OPERAND (inner, 0);