diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-16 13:11:01 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-16 13:11:01 +0000 |
commit | 5ef4302decef27883c0597635fa141e951c8085e (patch) | |
tree | f79d149e202c7c3356f9c21e62c050abce827f2b /gcc/tree-ssa-alias.c | |
parent | 75d6c3ea31cf2a542c76e02beed7efe997c39aa0 (diff) | |
download | gcc-5ef4302decef27883c0597635fa141e951c8085e.tar.gz |
2012-05-16 Richard Guenther <rguenther@suse.de>
PR tree-optimization/53364
* tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Properly
detect a view-conversion of the decl.
* g++.dg/torture/pr53364.C: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187590 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r-- | gcc/tree-ssa-alias.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index ec1bbbe0bff..540850fc5cb 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -850,8 +850,7 @@ indirect_ref_may_alias_decl_p (tree ref1 ATTRIBUTE_UNUSED, tree base1, /* If either reference is view-converted, give up now. */ if (same_type_for_tbaa (TREE_TYPE (base1), TREE_TYPE (ptrtype1)) != 1 - || same_type_for_tbaa (TREE_TYPE (dbase2), - TREE_TYPE (reference_alias_ptr_type (dbase2))) != 1) + || same_type_for_tbaa (TREE_TYPE (dbase2), TREE_TYPE (base2)) != 1) return true; /* If both references are through the same type, they do not alias |