summaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-23 08:27:47 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-23 08:27:47 +0000
commit3a1c59da7ff3b1f66842e37fbc040ba52e4829a1 (patch)
tree187cae71a9a56b40b7f5c620f27c57de2cf6991a /gcc/function.c
parent60d76236286f9abff18f6a503f608ecaa02f071f (diff)
downloadgcc-3a1c59da7ff3b1f66842e37fbc040ba52e4829a1.tar.gz
* function.c (assign_parm_setup_block): When creating a new stack slot
for a parameter, get its alignment from the parameter's DECL_ALIGN rather than the type's TYPE_ALIGN. Make sure that the parameter is at least word aligned. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94104 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 76c1b8e430f..f0d2ec1110d 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -2608,8 +2608,9 @@ assign_parm_setup_block (struct assign_parm_data_all *all,
size_stored = CEIL_ROUND (size, UNITS_PER_WORD);
if (stack_parm == 0)
{
+ DECL_ALIGN (parm) = MAX (DECL_ALIGN (parm), BITS_PER_WORD);
stack_parm = assign_stack_local (BLKmode, size_stored,
- TYPE_ALIGN (data->passed_type));
+ DECL_ALIGN (parm));
if (GET_MODE_SIZE (GET_MODE (entry_parm)) == size)
PUT_MODE (stack_parm, GET_MODE (entry_parm));
set_mem_attributes (stack_parm, parm, 1);