From ff91ad086a898e7cd96a7424533af87d1bd00d2b Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Mon, 6 May 1996 22:04:13 -0400 Subject: [PATCH] (expand_decl): Don't deduce alignment of SIZE from DECL_ALIGN; use TYPE_ALIGN instead. From-SVN: r11949 --- gcc/stmt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/stmt.c b/gcc/stmt.c index 951bb225fc7..6a2e670d95e 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -3463,9 +3463,12 @@ expand_decl (decl) NULL_RTX, VOIDmode, 0); free_temp_slots (); - /* Allocate space on the stack for the variable. */ + /* Allocate space on the stack for the variable. Note that + DECL_ALIGN says how the variable is to be aligned and we + cannot use it to conclude anything about the alignment of + the size. */ address = allocate_dynamic_stack_space (size, NULL_RTX, - DECL_ALIGN (decl)); + TYPE_ALIGN (TREE_TYPE (decl))); /* Reference the variable indirect through that rtx. */ DECL_RTL (decl) = gen_rtx (MEM, DECL_MODE (decl), address); -- 2.30.2