diff options
author | Richard Guenther <rguenther@suse.de> | 2012-05-16 13:11:01 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-05-16 13:11:01 +0000 |
commit | a952cc068c5df10333be537e9283e1aebc24c55d (patch) | |
tree | f79d149e202c7c3356f9c21e62c050abce827f2b /gcc/tree-ssa-alias.c | |
parent | 219d42f11a5f65265b8dda0ab4cb354746c3f456 (diff) | |
download | gcc-a952cc068c5df10333be537e9283e1aebc24c55d.zip gcc-a952cc068c5df10333be537e9283e1aebc24c55d.tar.gz gcc-a952cc068c5df10333be537e9283e1aebc24c55d.tar.bz2 |
re PR tree-optimization/53364 (Wrong code generation)
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.
From-SVN: r187590
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 ec1bbbe..540850f 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 |