aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-07-11 19:40:29 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2009-07-11 19:40:29 +0200
commitae58e548884f696e600966549867df23de3ff2d3 (patch)
treef7d7a64b4ca810edf1a746863dde1086ecd8cbd9 /gcc/cfgexpand.c
parentdd67163fa487933aff300fd75228b6889c9c6f6e (diff)
downloadgcc-ae58e548884f696e600966549867df23de3ff2d3.zip
gcc-ae58e548884f696e600966549867df23de3ff2d3.tar.gz
gcc-ae58e548884f696e600966549867df23de3ff2d3.tar.bz2
re PR target/40667 (stack frames are generated even with -fomit-frame-pointer)
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. From-SVN: r149513
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 62b5c45..c8d19fb1 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)
{