diff options
author | Diego Novillo <dnovillo@redhat.com> | 2004-09-15 02:58:28 +0000 |
---|---|---|
committer | Diego Novillo <dnovillo@gcc.gnu.org> | 2004-09-14 22:58:28 -0400 |
commit | 391f9afbd2d6ac8dd691c6d79a8817c63a637ca8 (patch) | |
tree | 1e2d0774d13dac9492acaed1a577afad8dd177c7 /gcc/tree-ssa-alias.c | |
parent | 67f236204409bd498339b92c65fdb031344e8e36 (diff) | |
download | gcc-391f9afbd2d6ac8dd691c6d79a8817c63a637ca8.tar.gz |
re PR tree-optimization/17252 (not marking char types as aliasing anything)
PR tree-optimization/17252
* tree-ssa-alias.c (may_alias_p): Don't assume that a
pointer may not point to itself when using relaxed
aliasing rules.
testsuite/ChangeLog
PR tree-optimization/17252
* gcc.c-torture/execute/pr17252.c: New test.
From-SVN: r87529
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r-- | gcc/tree-ssa-alias.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 65b0d7bc776..801de5bfaa5 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -1558,7 +1558,8 @@ may_alias_p (tree ptr, HOST_WIDE_INT mem_alias_set, for PTR's alias set here, not its pointed-to type. We also can't do this check with relaxed aliasing enabled. */ if (POINTER_TYPE_P (TREE_TYPE (var)) - && var_alias_set != 0) + && var_alias_set != 0 + && mem_alias_set != 0) { HOST_WIDE_INT ptr_alias_set = get_alias_set (ptr); if (ptr_alias_set == var_alias_set) |