aboutsummaryrefslogtreecommitdiff
path: root/gcc/explow.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2016-10-17 16:10:42 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2016-10-17 16:10:42 +0000
commitb8105705495f00ff9060fea7d70c69009c7a4f96 (patch)
tree65f73aad4b6e2da29e0fae1adc780367d6b3b3a7 /gcc/explow.c
parent80b841ba52a689712da44a91954c17a8aeace5c8 (diff)
downloadgcc-b8105705495f00ff9060fea7d70c69009c7a4f96.zip
gcc-b8105705495f00ff9060fea7d70c69009c7a4f96.tar.gz
gcc-b8105705495f00ff9060fea7d70c69009c7a4f96.tar.bz2
* explow.c (validize_mem): Do not modify the argument in-place.
From-SVN: r241247
Diffstat (limited to 'gcc/explow.c')
-rw-r--r--gcc/explow.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/explow.c b/gcc/explow.c
index fbebcbd..1c59c86 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -496,9 +496,8 @@ memory_address_addr_space (machine_mode mode, rtx x, addr_space_t as)
return x;
}
-/* If REF is a MEM with an invalid address, change it into a valid address.
- Pass through anything else unchanged. REF must be an unshared rtx and
- the function may modify it in-place. */
+/* Convert a mem ref into one with a valid memory address.
+ Pass through anything else unchanged. */
rtx
validize_mem (rtx ref)
@@ -510,7 +509,8 @@ validize_mem (rtx ref)
MEM_ADDR_SPACE (ref)))
return ref;
- return replace_equiv_address (ref, XEXP (ref, 0), true);
+ /* Don't alter REF itself, since that is probably a stack slot. */
+ return replace_equiv_address (ref, XEXP (ref, 0));
}
/* If X is a memory reference to a member of an object block, try rewriting