From: Richard Stallman Date: Sun, 18 Oct 1992 00:49:34 +0000 (+0000) Subject: (find_reloads_address): Redo last change: copy the mem X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ca3e4a2f2dba408a1706736ff1ec9cb8942edb38;p=gcc.git (find_reloads_address): Redo last change: copy the mem in the same way it's usually done. From-SVN: r2503 --- diff --git a/gcc/reload.c b/gcc/reload.c index befe84ecdea..f5afa5fc566 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -3633,7 +3633,13 @@ find_reloads_address (mode, memrefloc, ad, loc, operand, ind_levels) /* If tem was changed, then we must create a new memory reference to hold it and store it back into memrefloc. */ if (tem != ad && memrefloc) - *memrefloc = gen_rtx (MEM, GET_MODE (*memrefloc), tem); + { + rtx oldref = *memrefloc; + *memrefloc = copy_rtx (*memrefloc); + loc = &XEXP (*memrefloc, 0); + if (operand == oldref) + operand = *memrefloc; + } /* Check similar cases as for indirect addresses as above except that we can allow pseudos and a MEM since they should have been