From: Richard Stallman Date: Tue, 6 Oct 1992 00:19:55 +0000 (+0000) Subject: (find_reloads_address): If tem != ad, then create a new X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d25554549b6ea81d76a3cc920ff20ec915585f96;p=gcc.git (find_reloads_address): If tem != ad, then create a new mem to hold it and store it back into memrefloc. From-SVN: r2330 --- diff --git a/gcc/reload.c b/gcc/reload.c index b5f844ba3fa..459939b43cc 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -3618,6 +3618,12 @@ find_reloads_address (mode, memrefloc, ad, loc, operand, ind_levels) tem = ad; find_reloads_address (GET_MODE (ad), &tem, XEXP (ad, 0), &XEXP (ad, 0), operand, ind_levels == 0 ? 0 : ind_levels - 1); + + /* 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); + /* Check similar cases as for indirect addresses as above except that we can allow pseudos and a MEM since they should have been taken care of above. */