function.c (expand_function_end): Make sure we finish off any leftover exception...
authorMike Stump <mrs@gcc.gnu.org>
Thu, 15 May 1997 02:25:25 +0000 (02:25 +0000)
committerMike Stump <mrs@gcc.gnu.org>
Thu, 15 May 1997 02:25:25 +0000 (02:25 +0000)
* function.c (expand_function_end): Make sure we finish off any
leftover exception handlers.

From-SVN: r14067

gcc/function.c

index 571ac62f2e6e785407ddc14b14eabf375f4ce785..b2468dec5bc241732a2be2b38ef12550994f9380 100644 (file)
@@ -5572,6 +5572,24 @@ expand_function_end (filename, line, end_bindings)
   if (end_bindings)
     expand_end_bindings (0, 0, 0);
 
+  /* Now handle any leftover exception regions that may have been
+     created for the parameters.  */
+  {
+    rtx last = get_last_insn ();
+    rtx label;
+
+    expand_leftover_cleanups ();
+
+    /* If the above emitted any code, may sure we jump around it.  */
+    if (last != get_last_insn ())
+      {
+       label = gen_label_rtx ();
+       last = emit_jump_insn_after (gen_jump (label), last);
+       last = emit_barrier_after (last);
+       emit_label (label);
+      }
+  }
+
   /* If we had calls to alloca, and this machine needs
      an accurate stack pointer to exit the function,
      insert some code to save and restore the stack pointer.  */