aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-12-21 17:32:44 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2009-12-21 17:32:44 +0100
commitdcc1e1fab49e2b2d000b22f0053c0ffe53c44b14 (patch)
tree72b4a917e97d1d4beed7033890296db23fc20002 /gcc/reload.c
parent938a483f0d2d55bdb68b5f435750c22e5f6d0b95 (diff)
downloadgcc-dcc1e1fab49e2b2d000b22f0053c0ffe53c44b14.zip
gcc-dcc1e1fab49e2b2d000b22f0053c0ffe53c44b14.tar.gz
gcc-dcc1e1fab49e2b2d000b22f0053c0ffe53c44b14.tar.bz2
re PR rtl-optimization/42429 (Miscompilation of 2fish on s390)
PR rtl-optimization/42429 * reload.c (find_reloads_subreg_address): When adjusting mode of MEM, update also MEM_SIZE if it is set. From-SVN: r155374
Diffstat (limited to 'gcc/reload.c')
-rw-r--r--gcc/reload.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index 97c6bac..4601b4a 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -6149,6 +6149,9 @@ find_reloads_subreg_address (rtx x, int force_replace, int opnum,
PUT_MODE (tem, GET_MODE (x));
if (MEM_OFFSET (tem))
set_mem_offset (tem, plus_constant (MEM_OFFSET (tem), offset));
+ if (MEM_SIZE (tem)
+ && INTVAL (MEM_SIZE (tem)) != (HOST_WIDE_INT) outer_size)
+ set_mem_size (tem, GEN_INT (outer_size));
/* If this was a paradoxical subreg that we replaced, the
resulting memory must be sufficiently aligned to allow