https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89234
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- copy_reg_eh_region_note_forward is called with note_or_insn being (note 19 18 20 3 [bb 3] NOTE_INSN_BASIC_BLOCK) and because it is not INSN_P, it assumes it must be a REG_EH_REGION note and uses XEXP (note_or_insn, 0) on it and happily creates (expr_list:REG_EH_REGION (jump_insn 18 17 19 2 (set (pc) (if_then_else (ne (reg:CC 68 0 [130]) (const_int 0 [0])) (label_ref 24) (pc))) "pr89234.c":7:6 761 {*cbranch} (int_list:REG_BR_PROB 1073204964 (nil)) -> 24) (nil)) --- gcc/except.c.jj 2019-01-10 11:43:14.387377695 +0100 +++ gcc/except.c 2019-02-07 15:11:27.756869475 +0100 @@ -1756,6 +1756,8 @@ copy_reg_eh_region_note_forward (rtx not if (note == NULL) return; } + else if (is_a <rtx_insn *> (note_or_insn)) + return; note = XEXP (note, 0); for (insn = first; insn != last ; insn = NEXT_INSN (insn)) should fix the ICE, or LRA would need to be tweaked to make sure it never calls it with NOTEs and other non-INSN_P rtx_insns.