diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-15 10:48:17 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-15 10:48:17 +0000 |
commit | d3909c678e112ec8c4b574932c2c9f273131f107 (patch) | |
tree | cf71a31c094d976a5684e5387e5079bfd0807bb6 /gcc/expr.c | |
parent | e41fac10e9ef961c10fe3d0bd44fa5f2fffc8dab (diff) | |
download | ppe42-gcc-d3909c678e112ec8c4b574932c2c9f273131f107.tar.gz ppe42-gcc-d3909c678e112ec8c4b574932c2c9f273131f107.zip |
* expr.c (expand_expr_real_1) <VIEW_CONVERT_EXPR>: Do not unnecessarily
copy the object in the MEM_P case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192452 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index 1adea93c316..7cf812d3e3a 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -10270,10 +10270,15 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, { enum insn_code icode; - op0 = copy_rtx (op0); - if (TYPE_ALIGN_OK (type)) - set_mem_align (op0, MAX (MEM_ALIGN (op0), TYPE_ALIGN (type))); + { + /* ??? Copying the MEM without substantially changing it might + run afoul of the code handling volatile memory references in + store_expr, which assumes that TARGET is returned unmodified + if it has been used. */ + op0 = copy_rtx (op0); + set_mem_align (op0, MAX (MEM_ALIGN (op0), TYPE_ALIGN (type))); + } else if (mode != BLKmode && MEM_ALIGN (op0) < GET_MODE_ALIGNMENT (mode) /* If the target does have special handling for unaligned |