aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1992-12-16 11:19:12 -0800
committerJim Wilson <wilson@gcc.gnu.org>1992-12-16 11:19:12 -0800
commit8d618585fce328e1f7cf818aa8d16dae679161ca (patch)
tree752af2f30aa95e4783a7a778c83b00a623d53588
parentc8c29f855dffe19d597187293ac21e87d249357f (diff)
downloadgcc-8d618585fce328e1f7cf818aa8d16dae679161ca.zip
gcc-8d618585fce328e1f7cf818aa8d16dae679161ca.tar.gz
gcc-8d618585fce328e1f7cf818aa8d16dae679161ca.tar.bz2
(get_secondary_mem): Don't save address if it isn't valid.
From-SVN: r2886
-rw-r--r--gcc/reload.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index d440eeb..f9b0a0c 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -431,7 +431,12 @@ get_secondary_mem (x, mode)
if (! mem_valid)
find_reloads_address (mode, NULL_PTR, XEXP (loc, 0), &XEXP (loc, 0), x, 0);
- secondary_memlocs_elim[(int) mode] = loc;
+ /* If the address was not valid to begin with, we can not save it, because
+ there is no guarantee that the reloads needed to make it valid will
+ occur before every use of this address. */
+
+ else
+ secondary_memlocs_elim[(int) mode] = loc;
return loc;
}