diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1996-05-06 22:04:13 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1996-05-06 22:04:13 -0400 |
commit | ff91ad086a898e7cd96a7424533af87d1bd00d2b (patch) | |
tree | 750c5958d080098d83ad3b1c90e4df492408963e /gcc | |
parent | d1b680c63b484963461a7a8be9b046b2827841f3 (diff) | |
download | gcc-ff91ad086a898e7cd96a7424533af87d1bd00d2b.zip gcc-ff91ad086a898e7cd96a7424533af87d1bd00d2b.tar.gz gcc-ff91ad086a898e7cd96a7424533af87d1bd00d2b.tar.bz2 |
(expand_decl): Don't deduce alignment of SIZE from DECL_ALIGN; use
TYPE_ALIGN instead.
From-SVN: r11949
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/stmt.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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); |