diff options
Diffstat (limited to 'gcc/explow.c')
-rw-r--r-- | gcc/explow.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/explow.c b/gcc/explow.c index 1acb834709a..68394598271 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -610,10 +610,12 @@ validize_mem (ref) { if (GET_CODE (ref) != MEM) return ref; - if (memory_address_p (GET_MODE (ref), XEXP (ref, 0))) + if (! (flag_force_addr && CONSTANT_ADDRESS_P (XEXP (ref, 0))) + && memory_address_p (GET_MODE (ref), XEXP (ref, 0))) return ref; + /* Don't alter REF itself, since that is probably a stack slot. */ - return change_address (ref, GET_MODE (ref), XEXP (ref, 0)); + return replace_equiv_address (ref, XEXP (ref, 0)); } /* Given REF, either a MEM or a REG, and T, either the type of X or |