From: dalej Date: Wed, 30 Mar 2005 20:21:37 +0000 (+0000) Subject: 2005-03-30 Dale Johannesen X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=82e95be3b8242fdda13db619bc316f1c36aa2488;p=thirdparty%2Fgcc.git 2005-03-30 Dale Johannesen PR middle-end/19225 * calls.c (expand_call): Flush pending deferrals before throwing call. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97277 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f65e3f9f98c6..1d20452dc322 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-03-30 Dale Johannesen + + PR middle-end/19225 + * calls.c (expand_call): Flush pending deferrals before + throwing call. + 2005-03-30 Joseph S. Myers PR c/772 diff --git a/gcc/calls.c b/gcc/calls.c index 54307bf4be55..3eb16c023d10 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -2261,10 +2261,14 @@ expand_call (tree exp, rtx target, int ignore) Also, do all pending adjustments now if there is any chance this might be a call to alloca or if we are expanding a sibling call sequence or if we are calling a function that is to return - with stack pointer depressed. */ + with stack pointer depressed. + Also do the adjustments before a throwing call, otherwise + exception handling can fail; PR 19225. */ if (pending_stack_adjust >= 32 || (pending_stack_adjust > 0 && (flags & (ECF_MAY_BE_ALLOCA | ECF_SP_DEPRESSED))) + || (pending_stack_adjust > 0 + && flag_exceptions && !(flags & ECF_NOTHROW)) || pass == 0) do_pending_stack_adjust ();