function.c (assign_stack_local_1): Do not correct stack slot address if allocation...
authorDavid Edelsohn <edelsohn@gnu.org>
Thu, 4 Aug 2005 18:36:26 +0000 (18:36 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Thu, 4 Aug 2005 18:36:26 +0000 (14:36 -0400)
        * function.c (assign_stack_local_1): Do not correct stack slot
        address if allocation size is smaller than mode size.

From-SVN: r102742

gcc/ChangeLog
gcc/function.c

index 6b62ce56129d182e0d6b81f673ffe67654412f5b..8472494c3742d090bea370ac310fcab59454b4a2 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-04  David Edelsohn  <edelsohn@gnu.org>
+
+       * function.c (assign_stack_local_1): Do not correct stack slot
+       address if allocation size is smaller than mode size.
+
 2005-08-04  Diego Novillo  <dnovillo@redhat.com>
 
        PR 22037
index 225c2a981179750c4cf4a9878dbbd3ccb6530209..35840991d92213101ab7dd9e762bdf0f582704bb 100644 (file)
@@ -454,7 +454,7 @@ assign_stack_local_1 (enum machine_mode mode, HOST_WIDE_INT size, int align,
 
   /* On a big-endian machine, if we are allocating more space than we will use,
      use the least significant bytes of those that are allocated.  */
-  if (BYTES_BIG_ENDIAN && mode != BLKmode)
+  if (BYTES_BIG_ENDIAN && mode != BLKmode && GET_MODE_SIZE (mode) < size)
     bigend_correction = size - GET_MODE_SIZE (mode);
 
   /* If we have already instantiated virtual registers, return the actual