aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-05-06 22:04:13 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1996-05-06 22:04:13 -0400
commitff91ad086a898e7cd96a7424533af87d1bd00d2b (patch)
tree750c5958d080098d83ad3b1c90e4df492408963e /gcc
parentd1b680c63b484963461a7a8be9b046b2827841f3 (diff)
downloadgcc-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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 951bb22..6a2e670 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);