From d70eadf7badda66d552d4a68278c1d382e6e0a9b Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Thu, 4 Aug 2005 18:36:26 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/function.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6b62ce56129d..8472494c3742 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-08-04 David Edelsohn + + * 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 PR 22037 diff --git a/gcc/function.c b/gcc/function.c index 225c2a981179..35840991d922 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -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