function.c (assign_stack_local_1): Do not correct stack slot address if allocation size is smaller than mode size.

* function.c (assign_stack_local_1): Do not correct stack slot
        address if allocation size is smaller than mode size.

From-SVN: r102742
This commit is contained in:
David Edelsohn 2005-08-04 18:36:26 +00:00 committed by David Edelsohn
parent c4f548b8c5
commit d70eadf7ba
2 changed files with 6 additions and 1 deletions

View 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

View 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