From 8d618585fce328e1f7cf818aa8d16dae679161ca Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Wed, 16 Dec 1992 11:19:12 -0800 Subject: [PATCH] (get_secondary_mem): Don't save address if it isn't valid. From-SVN: r2886 --- gcc/reload.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/reload.c b/gcc/reload.c index d440eeb69ec..f9b0a0ce3c3 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; } -- 2.30.2