(expand_decl): Don't deduce alignment of SIZE from DECL_ALIGN; use
authorRichard Kenner <kenner@gcc.gnu.org>
Tue, 7 May 1996 02:04:13 +0000 (22:04 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Tue, 7 May 1996 02:04:13 +0000 (22:04 -0400)
TYPE_ALIGN instead.

From-SVN: r11949

gcc/stmt.c

index 951bb225fc72f5013a9d98380b12a531e0f61b54..6a2e670d95ef4a65ee26f246e9f0fd40282aa918 100644 (file)
@@ -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);