From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5D3A83857422; Wed, 7 Jul 2021 06:38:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D3A83857422 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/101347] [11/12 Regression] ICE in cfg_layout_initialize with __builtin_setjmp and -fprofile-generate -fprofile-use Date: Wed, 07 Jul 2021 06:38:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: everconfirmed bug_status cf_reconfirmed_on Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2021 06:38:39 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101347 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2021-07-07 --- Comment #1 from Richard Biener --- Confirmed. Program received signal SIGSEGV, Segmentation fault. 0x0000000000cc2c66 in cfg_layout_initialize (flags=3D0) at /home/rguenther/src/gcc2/gcc/cfgrtl.c:4478 4478 bb->flags |=3D BB_NON_LOCAL_GOTO_TARGET; (gdb) l 4473 4474 /* Make sure that the targets of non local gotos are marked. */ 4475 for (x =3D nonlocal_goto_handler_labels; x; x =3D x->next ()) 4476 { 4477 bb =3D BLOCK_FOR_INSN (x->insn ()); 4478 bb->flags |=3D 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=3D0x7ffff6557780) at /home/rguenther/src/gcc2/gcc/cfgrtl.c:138 138 bool really_delete =3D true; (gdb) p debug_rtx (insn) (code_label/s 38 37 53 5 3 (nil) [3 uses]) (gdb) bt #0 delete_insn (insn=3D0x7ffff6557780) at /home/rguenther/src/gcc2/gcc/cfgrtl.c:138 #1 0x0000000000cb8d09 in delete_insn_chain (start=3D0x7ffff6557780,=20 finish=3D0x7ffff6557e00, clear_bb=3Dtrue) at /home/rguenther/src/gcc2/gcc/cfgrtl.c:273 #2 0x0000000000cb913f in rtl_delete_block (b=3D) at /home/rguenther/src/gcc2/gcc/cfgrtl.c:420 #3 0x0000000000ca542a in delete_basic_block ( bb=3D) 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=3D16) at /home/rguenther/src/gcc2/gcc/cfgcleanup.c:3122 #6 0x0000000000c9cc0f in (anonymous namespace)::pass_expand::execute ( this=3D0x38446a0, fun=3D0x7ffff669f000) at /home/rguenther/src/gcc2/gcc/cfgexpand.c:6974 #7 0x00000000012275f7 in execute_one_pass ( pass=3D) at /home/rguenther/src/gcc2/gcc/passes.c:2567 I don't know how nonlocal_goto_handler_labels is supposed to work.=