(preserve_temp_slots): If X cannot be a temp slot, preserve all things
authorRichard Kenner <kenner@gcc.gnu.org>
Fri, 7 Oct 1994 20:13:58 +0000 (16:13 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Fri, 7 Oct 1994 20:13:58 +0000 (16:13 -0400)
whose address was taken at the present level.

From-SVN: r8238

gcc/function.c

index 00801cd4edc25fc91b74a1430b7f789c2a627864..b0d76ecb740e982f5d22c7e13644be27a4eac261 100644 (file)
@@ -1040,12 +1040,19 @@ preserve_temp_slots (x)
     p = find_temp_slot_from_address (x);
 
   /* If X is not in memory or is at a constant address, it cannot be in
-     a temporary slot.  */
+     a temporary slot, but it can contain something whose address was
+     taken.  */
   if (p == 0 && (GET_CODE (x) != MEM || CONSTANT_P (XEXP (x, 0))))
-    return;
+    {
+      for (p = temp_slots; p; p = p->next)
+       if (p->in_use && p->level == temp_slot_level && p->addr_taken)
+         p->level--;
+
+      return;
+    }
 
   /* First see if we can find a match.  */
-  if (p== 0)
+  if ( p== 0)
     p = find_temp_slot_from_address (XEXP (x, 0));
 
   if (p != 0)