decl2.c (do_static_initialization): Call do_pending_stack_adjust.
authorRichard Henderson <rth@cygnus.com>
Thu, 29 Apr 1999 17:43:16 +0000 (10:43 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 29 Apr 1999 17:43:16 +0000 (10:43 -0700)
        * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
        (do_static_destruction): Likewise.

From-SVN: r26700

gcc/cp/ChangeLog
gcc/cp/decl2.c

index e19e6d3da234982dafe520c36b83d67553538f16..01e462742c3f02c3ff8f20bd47932e4526c3df3d 100644 (file)
@@ -1,3 +1,8 @@
+1999-04-29  Richard Henderson  <rth@cygnus.com>
+
+       * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
+       (do_static_destruction): Likewise.
+
 1999-04-29  Nathan Sidwell  <nathan@acm.org>
 
        * cp-tree.h (TYPE_NOTHROW_P): New macro.
index 20a395783ecbc9d89e63530d896036a15fd4c8bb..7e96a92a4f289c1302ca16ee3c53ed7ba4e2dc08 100644 (file)
@@ -3220,6 +3220,11 @@ do_static_initialization (decl, init, sentry, priority)
   /* 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 ();
@@ -3276,6 +3281,11 @@ do_static_destruction (decl, sentry, priority)
   /* 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)
     expand_end_cond ();