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

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Alexander Monakov from comment #6) 
> Note the REG_EH_REGION. This is relevant because can_nonlocal_goto checks
> it, so for insn 25 we knew it wouldn't return to the setjmp receiver.
> Applying the peephole dropped the note.

This should fix it but there might be other REG notes that need to be copied
still:
apinski@xeond:~/src/upstream-gcc/gcc/gcc$ git diff recog.cc
diff --git a/gcc/recog.cc b/gcc/recog.cc
index 37432087812..4bad4a59057 100644
--- a/gcc/recog.cc
+++ b/gcc/recog.cc
@@ -3921,6 +3921,7 @@ peep2_attempt (basic_block bb, rtx_insn *insn, int
match_len, rtx_insn *attempt)
          {
          case REG_NORETURN:
          case REG_SETJMP:
+         case REG_EH_REGION:
          case REG_TM:
          case REG_CALL_NOCF_CHECK:
            add_reg_note (new_insn, REG_NOTE_KIND (note),

Reply via email to