From 9aa4d3c1cbd78511c868b2361eb033d685e1dc25 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Thu, 7 Aug 2008 10:01:48 +0000 Subject: re PR middle-end/37042 (Strict-aliasing warnings are printed for _mm_load_si128, even though __m128i is __attribute__((__may_alias__)).) 2008-08-07 Richard Guenther PR middle-end/37042 * tree-ssa-alias-warnings.c (nonstandard_alias_p): Ref-all pointers can access anything. * gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c: New testcase. From-SVN: r138837 --- gcc/tree-ssa-alias-warnings.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/tree-ssa-alias-warnings.c') diff --git a/gcc/tree-ssa-alias-warnings.c b/gcc/tree-ssa-alias-warnings.c index 67d7f94..5bae978 100644 --- a/gcc/tree-ssa-alias-warnings.c +++ b/gcc/tree-ssa-alias-warnings.c @@ -889,6 +889,10 @@ nonstandard_alias_p (tree ptr, tree alias, bool ptr_ptr) tree ptr_type = get_otype (ptr, true); tree alias_type = get_otype (alias, ptr_ptr); + /* If this is a ref-all pointer the access is ok. */ + if (TYPE_REF_CAN_ALIAS_ALL (TREE_TYPE (ptr))) + return false; + /* XXX: for now, say it's OK if the alias escapes. Not sure this is needed in general, but otherwise GCC will not bootstrap. */ -- cgit v1.1