summaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-11 17:40:29 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-11 17:40:29 +0000
commit8645d3e7de18e07ecec03a645dbe7650d34e63f4 (patch)
treef7d7a64b4ca810edf1a746863dde1086ecd8cbd9 /gcc/cfgexpand.c
parent738ab6f51ce3bb0ec1b2ee03249a0738db98b0cf (diff)
downloadgcc-8645d3e7de18e07ecec03a645dbe7650d34e63f4.tar.gz
PR rtl-optimization/40667
* defaults.h (MINIMUM_ALIGNMENT): Define if not defined. * doc/tm.texi (MINIMUM_ALIGNMENT): Document it. * config/i386/i386.h (MINIMUM_ALIGNMENT): Define. * config/i386/i386.c (ix86_minimum_alignment): New function. * config/i386/i386-protos.h (ix86_minimum_alignment): New prototype. * cfgexpand.c (expand_one_var): Use MINIMIM_ALIGNMENT. * emit-rtl.c (gen_reg_rtx): Likewise. * function.c (assign_parms): Likewise. If nominal_type needs bigger alignment than FUNCTION_ARG_BOUNDARY, use its alignment rather than passed_type's alignment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149513 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r--gcc/cfgexpand.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 62b5c4515d1..c8d19fb19e2 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -1164,9 +1164,11 @@ expand_one_var (tree var, bool toplevel, bool really_expand)
variables, which won't be on stack, we collect alignment of
type and ignore user specified alignment. */
if (TREE_STATIC (var) || DECL_EXTERNAL (var))
- align = TYPE_ALIGN (TREE_TYPE (var));
+ align = MINIMUM_ALIGNMENT (TREE_TYPE (var),
+ TYPE_MODE (TREE_TYPE (var)),
+ TYPE_ALIGN (TREE_TYPE (var)));
else
- align = DECL_ALIGN (var);
+ align = MINIMUM_ALIGNMENT (var, DECL_MODE (var), DECL_ALIGN (var));
if (crtl->stack_alignment_estimated < align)
{