aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias-warnings.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2008-08-07 10:01:48 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2008-08-07 10:01:48 +0000
commit9aa4d3c1cbd78511c868b2361eb033d685e1dc25 (patch)
tree06cb786d8a360c118a8f2be8fafa3fa8b87513b8 /gcc/tree-ssa-alias-warnings.c
parent18bd082d900d085c09132cc66cec118dd2037fc2 (diff)
downloadgcc-9aa4d3c1cbd78511c868b2361eb033d685e1dc25.zip
gcc-9aa4d3c1cbd78511c868b2361eb033d685e1dc25.tar.gz
gcc-9aa4d3c1cbd78511c868b2361eb033d685e1dc25.tar.bz2
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 <rguenther@suse.de> 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
Diffstat (limited to 'gcc/tree-ssa-alias-warnings.c')
-rw-r--r--gcc/tree-ssa-alias-warnings.c4
1 files changed, 4 insertions, 0 deletions
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. */