aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-operands.c
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2006-08-25 07:13:48 +0000
committerAndrew Pinski <pinskia@physics.uc.edu>2006-08-25 07:13:48 +0000
commit5f2fb37723fecbc01ba76008393bb03b8fdf230f (patch)
treef40e0754fe57cf6ccebf878a32456f5dde203129 /gcc/tree-ssa-operands.c
parenta5105d419fcc9a47fb8226ba3a610a14438dc7cb (diff)
2006-08-24 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/28807 * tree-ssa-operands.c (access_can_touch_variable): Don't say the access through a base which has an alias set of 0 cannot touch the variable. 2006-08-24 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/28807 * gcc.c-torture/execute/mayalias-2.c: New test. * gcc.dg/tree-ssa/alias-13.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@116393 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-operands.c')
-rw-r--r--gcc/tree-ssa-operands.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index 05637814f13..0e931ca74a9 100644
--- a/gcc/tree-ssa-operands.c
+++ b/gcc/tree-ssa-operands.c
@@ -1150,7 +1150,10 @@ access_can_touch_variable (tree ref, tree alias, HOST_WIDE_INT offset,
|| TREE_CODE (TREE_TYPE (base)) != UNION_TYPE)
&& !AGGREGATE_TYPE_P (TREE_TYPE (alias))
&& TREE_CODE (TREE_TYPE (alias)) != COMPLEX_TYPE
- && !POINTER_TYPE_P (TREE_TYPE (alias)))
+ && !POINTER_TYPE_P (TREE_TYPE (alias))
+ /* When the struct has may_alias attached to it, we need not to
+ return true. */
+ && get_alias_set (base))
{
#ifdef ACCESS_DEBUGGING
fprintf (stderr, "Access to ");