https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110307

--- Comment #8 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
REG_EH_REGION is handled further down that function, but
copy_reg_eh_region_note_backward does not copy the note. Perhaps it needs

diff --git a/gcc/except.cc b/gcc/except.cc
index e728aa43b6..cfe140c4d0 100644
--- a/gcc/except.cc
+++ b/gcc/except.cc
@@ -1795,7 +1795,7 @@ copy_reg_eh_region_note_backward (rtx note_or_insn,
rtx_insn *last, rtx first)
   note = XEXP (note, 0);

   for (insn = last; insn != first; insn = PREV_INSN (insn))
-    if (insn_could_throw_p (insn))
+    if (insn_could_throw_p (insn) || can_nonlocal_goto (insn))
       add_reg_note (insn, REG_EH_REGION, note);
 }

?

Reply via email to