summaryrefslogtreecommitdiff
path: root/gcc/reload.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1999-02-12 00:49:04 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1999-02-12 00:49:04 +0000
commite128a39e5d652e681f9c7a8aead3b970a000b13e (patch)
treead26035c66306b5a8be515286cce48265032b483 /gcc/reload.c
parente2ebbed634e13a66ae0dd7a7d1c512b4c8365254 (diff)
downloadgcc-e128a39e5d652e681f9c7a8aead3b970a000b13e.tar.gz
* reload.c (find_reloads_address_1): Fix handling of an autoincremented
pseudo which is homed in the stack. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25162 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload.c')
-rw-r--r--gcc/reload.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index aa16d10c648..9959942f8c5 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -5334,6 +5334,14 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn)
(context ? INDEX_REG_CLASS : BASE_REG_CLASS),
GET_MODE (x), GET_MODE (x), 0, 0,
opnum, RELOAD_OTHER);
+
+ /* If we created a new MEM based on reg_equiv_mem[REGNO], then
+ LOC above is part of the new MEM, not the MEM in INSN.
+
+ We must also replace the address of the MEM in INSN. */
+ if (&XEXP (x_orig, 0) != loc)
+ push_replacement (&XEXP (x_orig, 0), reloadnum, VOIDmode);
+
}
else
{