]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386.c (ix86_compute_frame_layout): Do add bottom alignment for alloca.
authorRichard Henderson <rth@redhat.com>
Wed, 29 May 2002 20:34:28 +0000 (13:34 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 29 May 2002 20:34:28 +0000 (13:34 -0700)
        * config/i386/i386.c (ix86_compute_frame_layout): Do add bottom
        alignment for alloca.

        * gcc.c-torture/execute/alloca-1.c: New.

From-SVN: r54020

gcc/ChangeLog
gcc/config/i386/i386.c

index ef4468c584d62c639e52874b8193f9ad563c42d2..5c7c42a51620feb2b646cba900b038c30dee9807 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-29  Richard Henderson  <rth@redhat.com>
+
+       * config/i386/i386.c (ix86_compute_frame_layout): Do add bottom
+       alignment for alloca.
+
 2002-05-29  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        PR preprocessor/6844
index bf9fb6d5738555fc338d92eb47596a580c2ec83a..48f646a14942fe1c1da35cb320825653341030d1 100644 (file)
@@ -4025,8 +4025,9 @@ ix86_compute_frame_layout (frame)
   else
     frame->outgoing_arguments_size = 0;
 
-  /* Align stack boundary.  Only needed if we're calling another function.  */
-  if (!current_function_is_leaf)
+  /* Align stack boundary.  Only needed if we're calling another function
+     or using alloca.  */
+  if (!current_function_is_leaf || current_function_calls_alloca)
     frame->padding2 = ((offset + preferred_alignment - 1)
                       & -preferred_alignment) - offset;
   else