+2004-01-16 Jan Hubicka <jh@suse.cz>
+
+ PR opt/13608
+ * i386.c (ix86_compute_frame_layout): Fix for alloca on leaf function.
+
2004-01-16 Segher Boessenkool <boessen@de.ibm.com>
PR target/11793
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;