(get_secondary_mem): Don't save address if it isn't valid.
authorJim Wilson <wilson@gcc.gnu.org>
Wed, 16 Dec 1992 19:19:12 +0000 (11:19 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Wed, 16 Dec 1992 19:19:12 +0000 (11:19 -0800)
From-SVN: r2886

gcc/reload.c

index d440eeb69ec629ae0632b6bb4e4737f9160d1d71..f9b0a0ce3c3ac2576d06e291fa467210c7a484a0 100644 (file)
@@ -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;
 }