From ca3e4a2f2dba408a1706736ff1ec9cb8942edb38 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Sun, 18 Oct 1992 00:49:34 +0000 Subject: [PATCH] (find_reloads_address): Redo last change: copy the mem in the same way it's usually done. From-SVN: r2503 --- gcc/reload.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- 2.30.2