From: Richard Kenner Date: Tue, 7 May 1996 02:04:13 +0000 (-0400) Subject: (expand_decl): Don't deduce alignment of SIZE from DECL_ALIGN; use X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ff91ad086a898e7cd96a7424533af87d1bd00d2b;p=gcc.git (expand_decl): Don't deduce alignment of SIZE from DECL_ALIGN; use TYPE_ALIGN instead. From-SVN: r11949 --- 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);