aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2007-05-18 10:37:03 +0200
committerUros Bizjak <uros@gcc.gnu.org>2007-05-18 10:37:03 +0200
commit4bcc9de5fd598dec1c621f98fa7c37f6940c65d4 (patch)
treed7635534fc437172a0dd851e19abf9a09c51b3a7 /gcc/expr.c
parentb60b471172167ddbfe0ef0e6d2691af28aae9196 (diff)
downloadgcc-4bcc9de5fd598dec1c621f98fa7c37f6940c65d4.zip
gcc-4bcc9de5fd598dec1c621f98fa7c37f6940c65d4.tar.gz
gcc-4bcc9de5fd598dec1c621f98fa7c37f6940c65d4.tar.bz2
re PR middle-end/31344 (bootstrap broken on i[345]86-linux)
PR rtl-optimization/31344 * expr.c (emit_move_change_mode): Change mode of push operands here. testsuite/ChangeLog: PR rtl-optimization/31344 * gcc.dg/pr31344.c: New test. From-SVN: r124825
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 9286ffa..8c4b03d 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -2867,7 +2867,12 @@ emit_move_change_mode (enum machine_mode new_mode,
{
rtx ret;
- if (MEM_P (x))
+ if (push_operand (x, GET_MODE (x)))
+ {
+ ret = gen_rtx_MEM (new_mode, XEXP (x, 0));
+ MEM_COPY_ATTRIBUTES (ret, x);
+ }
+ else if (MEM_P (x))
{
/* We don't have to worry about changing the address since the
size in bytes is supposed to be the same. */