summaryrefslogtreecommitdiff
path: root/gcc/except.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/except.c')
-rw-r--r--gcc/except.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/except.c b/gcc/except.c
index fce1b723806..12abb103d65 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -945,15 +945,18 @@ start_dynamic_handler ()
#ifdef DONT_USE_BUILTIN_SETJMP
x = emit_library_call_value (setjmp_libfunc, NULL_RTX, 1, SImode, 1,
buf, Pmode);
+ /* If we come back here for a catch, transfer control to the handler. */
+ jumpif_rtx (x, ehstack.top->entry->exception_handler_label);
#else
- x = expand_builtin_setjmp (buf, NULL_RTX);
+ {
+ /* A label to continue execution for the no exception case. */
+ rtx noex = gen_label_rtx();
+ x = expand_builtin_setjmp (buf, NULL_RTX, noex,
+ ehstack.top->entry->exception_handler_label);
+ emit_label (noex);
+ }
#endif
- /* If we come back here for a catch, transfer control to the
- handler. */
-
- jumpif_rtx (x, ehstack.top->entry->exception_handler_label);
-
/* We are committed to this, so update the handler chain. */
emit_move_insn (dhc, XEXP (arg, 0));