From: Richard Sandiford Date: Sun, 23 Jan 2005 08:27:47 +0000 (+0000) Subject: function.c (assign_parm_setup_block): When creating a new stack slot for a parameter... X-Git-Tag: releases/gcc-4.0.0~1353 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a561d88b9321d5760b40fb53a260345e4701b414;p=thirdparty%2Fgcc.git function.c (assign_parm_setup_block): When creating a new stack slot for a parameter... * 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. From-SVN: r94104 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 07c5b17c5f2c..d9fc40559dc4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2005-01-23 Richard Sandiford + + * 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. + 2005-01-22 Roger Sayle PR middle-end/19378 diff --git a/gcc/function.c b/gcc/function.c index 76c1b8e430ff..f0d2ec1110dd 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);