diff options
author | Cary Coutant <ccoutant@google.com> | 2009-09-25 20:51:40 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2009-09-25 20:51:40 +0000 |
commit | 90ff80ffce47736ab7319058a44a0704a7fdb31e (patch) | |
tree | 3de65ba61f89a48c0ec028672acb475ea3f1819b /gcc/tree-ssa-forwprop.c | |
parent | ebd9739bcfd2dc4c6409fb0b96d95894191b2c28 (diff) |
Merged revisions 151950:152181 from trunk.dwarf4
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/dwarf4@152186 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-forwprop.c')
-rw-r--r-- | gcc/tree-ssa-forwprop.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index 5aec33415d4..87795a28223 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -831,7 +831,9 @@ forward_propagate_addr_expr_1 (tree name, tree def_rhs, && !TYPE_VOLATILE (TREE_TYPE (rhs)) && !TYPE_VOLATILE (TREE_TYPE (TREE_OPERAND (def_rhs, 0))) && operand_equal_p (TYPE_SIZE (TREE_TYPE (rhs)), - TYPE_SIZE (TREE_TYPE (TREE_OPERAND (def_rhs, 0))), 0)) + TYPE_SIZE (TREE_TYPE (TREE_OPERAND (def_rhs, 0))), 0) + /* Make sure we only do TBAA compatible replacements. */ + && get_alias_set (TREE_OPERAND (def_rhs, 0)) == get_alias_set (rhs)) { tree def_rhs_base, new_rhs = unshare_expr (TREE_OPERAND (def_rhs, 0)); new_rhs = fold_build1 (VIEW_CONVERT_EXPR, TREE_TYPE (rhs), new_rhs); |