summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-04 13:36:24 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-04 13:36:24 +0000
commite1c1f86acd9a5a4958dccc292219ebbb0b332a75 (patch)
tree7be6b9bfc5b2d537a6ada3b89f675284d792fe68 /gcc/tree-ssa-alias.c
parent5a41d783acbed929d6fe7da7dfe989e4953bc454 (diff)
downloadgcc-e1c1f86acd9a5a4958dccc292219ebbb0b332a75.tar.gz
PR tree-optimization/50522
* tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Don't test TYPE_RESTRICT. (ptr_derefs_may_alias_p): Call pt_solutions_same_restrict_base unconditionally. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179502 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r--gcc/tree-ssa-alias.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index 82307decaf4..a89094467f1 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -223,7 +223,6 @@ ptr_deref_may_alias_decl_p (tree ptr, tree decl)
pointer and that pointers points-to set doesn't contain this decl
then they can't alias. */
if (DECL_RESTRICTED_P (decl)
- && TYPE_RESTRICT (TREE_TYPE (ptr))
&& pi->pt.vars_contains_restrict)
return bitmap_bit_p (pi->pt.vars, DECL_PT_UID (decl));
@@ -319,9 +318,7 @@ ptr_derefs_may_alias_p (tree ptr1, tree ptr2)
/* If both pointers are restrict-qualified try to disambiguate
with restrict information. */
- if (TYPE_RESTRICT (TREE_TYPE (ptr1))
- && TYPE_RESTRICT (TREE_TYPE (ptr2))
- && !pt_solutions_same_restrict_base (&pi1->pt, &pi2->pt))
+ if (!pt_solutions_same_restrict_base (&pi1->pt, &pi2->pt))
return false;
/* ??? This does not use TBAA to prune decls from the intersection