diff options
author | Jakub Jelinek <jakub@redhat.com> | 2015-02-12 10:13:58 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2015-02-12 10:13:58 +0000 |
commit | 70a0fe566ad0f94ff9cdf98bb230135c6d75f683 (patch) | |
tree | b049bced061eb1c69d160aaee2452dbc3d15ec49 /gcc/expr.c | |
parent | f17e41c12d71ca74fe59bcf3ea59fe7410918673 (diff) | |
parent | 00087f8041b7e9708c37eb315ebf25999043f3c9 (diff) |
svn merge -r219311:220635 svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branchredhat/gcc-4_9-branch
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/redhat/gcc-4_9-branch@220644 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index 6d68d37e95f..8d1844aa886 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -9992,7 +9992,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, tree tem = get_inner_reference (exp, &bitsize, &bitpos, &offset, &mode1, &unsignedp, &volatilep, true); rtx orig_op0, memloc; - bool mem_attrs_from_type = false; + bool clear_mem_expr = false; /* If we got back the original object, something is wrong. Perhaps we are evaluating an expression too early. In any event, don't @@ -10088,7 +10088,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, memloc = assign_temp (TREE_TYPE (tem), 1, 1); emit_move_insn (memloc, op0); op0 = memloc; - mem_attrs_from_type = true; + clear_mem_expr = true; } if (offset) @@ -10273,17 +10273,17 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, if (op0 == orig_op0) op0 = copy_rtx (op0); - /* If op0 is a temporary because of forcing to memory, pass only the - type to set_mem_attributes so that the original expression is never - marked as ADDRESSABLE through MEM_EXPR of the temporary. */ - if (mem_attrs_from_type) - set_mem_attributes (op0, type, 0); - else - set_mem_attributes (op0, exp, 0); + set_mem_attributes (op0, exp, 0); if (REG_P (XEXP (op0, 0))) mark_reg_pointer (XEXP (op0, 0), MEM_ALIGN (op0)); + /* If op0 is a temporary because the original expressions was forced + to memory, clear MEM_EXPR so that the original expression cannot + be marked as addressable through MEM_EXPR of the temporary. */ + if (clear_mem_expr) + set_mem_expr (op0, NULL_TREE); + MEM_VOLATILE_P (op0) |= volatilep; if (mode == mode1 || mode1 == BLKmode || mode1 == tmode || modifier == EXPAND_CONST_ADDRESS |