This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Leaf optimization/call stuff?
- To: mark at codesourcery dot com
- Subject: Re: Leaf optimization/call stuff?
- From: Richard Henderson <rth at cygnus dot com>
- Date: Thu, 29 Apr 1999 17:44:00 -0700
- Cc: egcs-patches at egcs dot cygnus dot com
- References: <199904291702.KAA14099@adsl-206-170-148-33.dsl.snfc21.pacbell.net> <19990429115957.C28955@cygnus.com>
I committed this alternate fix.
r~
* decl2.c (do_static_initialization): Call do_pending_stack_adjust.
(do_static_destruction): Likewise.
Index: cp/decl2.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/decl2.c,v
retrieving revision 1.209
diff -c -p -d -r1.209 decl2.c
*** decl2.c 1999/04/29 08:33:43 1.209
--- decl2.c 1999/04/30 00:36:53
*************** do_static_initialization (decl, init, se
*** 3220,3225 ****
--- 3220,3230 ----
/* Cleanup any temporaries needed for the initial value. */
expand_end_target_temps ();
+ /* Cleanup any deferred pops from function calls. This would be done
+ by expand_end_cond, but we also need it when !sentry, since we are
+ constructing these sequences by parts. */
+ do_pending_stack_adjust ();
+
/* Close the conditional opened above. */
if (sentry)
expand_end_cond ();
*************** do_static_destruction (decl, sentry, pri
*** 3275,3280 ****
--- 3280,3290 ----
/* Actually to the destruction. */
expand_expr_stmt (build_cleanup (decl));
+
+ /* Cleanup any deferred pops from function calls. This would be done
+ by expand_end_cond, but we also need it when !sentry, since we are
+ constructing these sequences by parts. */
+ do_pending_stack_adjust ();
/* Close the conditional opened above. */
if (sentry)