From: Jan Hubicka Date: Fri, 16 Jan 2004 19:01:06 +0000 (+0100) Subject: re PR target/13608 (Incorrect code with -O3 -ffast-math) X-Git-Tag: releases/gcc-3.3.3~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8088c8254318ef408b865bd9a64e39f9620c51b9;p=thirdparty%2Fgcc.git re PR target/13608 (Incorrect code with -O3 -ffast-math) PR opt/13608 * i386.c (ix86_compute_frame_layout): Fix for alloca on leaf function. From-SVN: r75990 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2ae63a75de50..0e6aee8c5ca0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-01-16 Jan Hubicka + + PR opt/13608 + * i386.c (ix86_compute_frame_layout): Fix for alloca on leaf function. + 2004-01-16 Segher Boessenkool PR target/11793 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 0661d0a59a30..a3e00e58f9b1 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -4567,8 +4567,12 @@ ix86_compute_frame_layout (frame) offset += size; /* Add outgoing arguments area. Can be skipped if we eliminated - all the function calls as dead code. */ - if (ACCUMULATE_OUTGOING_ARGS && !current_function_is_leaf) + all the function calls as dead code. + Skipping is however impossible when function calls alloca. Alloca + expander assumes that last current_function_outgoing_args_size + of stack frame are unused. */ + if (ACCUMULATE_OUTGOING_ARGS + && (!current_function_is_leaf || current_function_calls_alloca)) { offset += current_function_outgoing_args_size; frame->outgoing_arguments_size = current_function_outgoing_args_size;