This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Leaf optimization/call stuff?


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]