(instantiate_decl): Always store addr back into x.
authorJim Wilson <wilson@gcc.gnu.org>
Wed, 25 Sep 1996 19:31:31 +0000 (12:31 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Wed, 25 Sep 1996 19:31:31 +0000 (12:31 -0700)
From-SVN: r12842

gcc/function.c

index 0591a8bea336b84517b4cd27ebc03853633a52a9..b34f48dd0e3be21e6a0dbd2b3c06491bcbdd2bbe 100644 (file)
@@ -2684,28 +2684,28 @@ instantiate_decl (x, size, valid_only)
 
   instantiate_virtual_regs_1 (&addr, NULL_RTX, 0);
 
-  if (! valid_only)
-    return;
-
-  /* Now verify that the resulting address is valid for every integer or
-     floating-point mode up to and including SIZE bytes long.  We do this
-     since the object might be accessed in any mode and frame addresses
-     are shared.  */
-
-  for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT);
-       mode != VOIDmode && GET_MODE_SIZE (mode) <= size;
-       mode = GET_MODE_WIDER_MODE (mode))
-    if (! memory_address_p (mode, addr))
-      return;
+  if (valid_only)
+    {
+      /* Now verify that the resulting address is valid for every integer or
+        floating-point mode up to and including SIZE bytes long.  We do this
+        since the object might be accessed in any mode and frame addresses
+        are shared.  */
+
+      for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT);
+          mode != VOIDmode && GET_MODE_SIZE (mode) <= size;
+          mode = GET_MODE_WIDER_MODE (mode))
+       if (! memory_address_p (mode, addr))
+         return;
 
-  for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT);
-       mode != VOIDmode && GET_MODE_SIZE (mode) <= size;
-       mode = GET_MODE_WIDER_MODE (mode))
-    if (! memory_address_p (mode, addr))
-      return;
+      for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT);
+          mode != VOIDmode && GET_MODE_SIZE (mode) <= size;
+          mode = GET_MODE_WIDER_MODE (mode))
+       if (! memory_address_p (mode, addr))
+         return;
+    }
 
-  /* Otherwise, put back the address, now that we have updated it and we
-     know it is valid.  */
+  /* Put back the address now that we have updated it and we either know
+     it is valid or we don't care whether it is valid.  */
 
   XEXP (x, 0) = addr;
 }