i386.c (ix86_compute_frame_layout): Do add bottom alignment for alloca.

* 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
This commit is contained in:
Richard Henderson 2002-05-29 13:34:28 -07:00 committed by Richard Henderson
parent e2c77eaf4a
commit 4da1d80483
2 changed files with 8 additions and 2 deletions

View 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

View 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