------- Comment #4 from rguenth at gcc dot gnu dot org 2010-04-27 10:37 ------- Which would be implemented by
Index: gcc/tree-ssa-alias.c =================================================================== --- gcc/tree-ssa-alias.c (revision 158770) +++ gcc/tree-ssa-alias.c (working copy) @@ -211,8 +211,7 @@ ptr_deref_may_alias_decl_p (tree ptr, tr /* If the decl can be used as a restrict tag and we have a restrict 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)) + if (TYPE_RESTRICT (TREE_TYPE (ptr)) && pi->pt.vars_contains_restrict) return bitmap_bit_p (pi->pt.vars, DECL_PT_UID (decl)); checking with ICC it optimizes both testcases. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43907