https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101347
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-07-07
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.
Program received signal SIGSEGV, Segmentation fault.
0x0000000000cc2c66 in cfg_layout_initialize (flags=0)
at /home/rguenther/src/gcc2/gcc/cfgrtl.c:4478
4478 bb->flags |= BB_NON_LOCAL_GOTO_TARGET;
(gdb) l
4473
4474 /* Make sure that the targets of non local gotos are marked. */
4475 for (x = nonlocal_goto_handler_labels; x; x = x->next ())
4476 {
4477 bb = BLOCK_FOR_INSN (x->insn ());
4478 bb->flags |= BB_NON_LOCAL_GOTO_TARGET;
4479 }
and bb is NULL. We have
(note/s 38 0 0 "" NOTE_INSN_DELETED_LABEL 3)
as x->insn (), so whatever deleted this label forgot to adjust
nonlocal_goto_handler_labels (or wrongly deleted it).
Breakpoint 5, delete_insn (insn=0x7ffff6557780)
at /home/rguenther/src/gcc2/gcc/cfgrtl.c:138
138 bool really_delete = true;
(gdb) p debug_rtx (insn)
(code_label/s 38 37 53 5 3 (nil) [3 uses])
(gdb) bt
#0 delete_insn (insn=0x7ffff6557780)
at /home/rguenther/src/gcc2/gcc/cfgrtl.c:138
#1 0x0000000000cb8d09 in delete_insn_chain (start=0x7ffff6557780,
finish=0x7ffff6557e00, clear_bb=true)
at /home/rguenther/src/gcc2/gcc/cfgrtl.c:273
#2 0x0000000000cb913f in rtl_delete_block (b=<basic_block 0x7ffff654f340 (5)>)
at /home/rguenther/src/gcc2/gcc/cfgrtl.c:420
#3 0x0000000000ca542a in delete_basic_block (
bb=<basic_block 0x7ffff654f340 (5)>)
at /home/rguenther/src/gcc2/gcc/cfghooks.c:603
#4 0x000000000229b84b in delete_unreachable_blocks ()
at /home/rguenther/src/gcc2/gcc/cfgcleanup.c:3058
#5 0x000000000229ba3c in cleanup_cfg (mode=16)
at /home/rguenther/src/gcc2/gcc/cfgcleanup.c:3122
#6 0x0000000000c9cc0f in (anonymous namespace)::pass_expand::execute (
this=0x38446a0, fun=0x7ffff669f000)
at /home/rguenther/src/gcc2/gcc/cfgexpand.c:6974
#7 0x00000000012275f7 in execute_one_pass (
pass=<opt_pass* 0x38446a0 "expand"(252)>)
at /home/rguenther/src/gcc2/gcc/passes.c:2567
I don't know how nonlocal_goto_handler_labels is supposed to work.