public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-101347-4-srAdSPkIR2@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101347-4@http.gcc.gnu.org/bugzilla/>

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.

  parent reply	other threads:[~2021-07-07  6:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06 17:29 [Bug c/101347] New: [11/12 Regression] ICE in cfg_layout_initialize, at cfgrtl.c:4478 gscfq@t-online.de
2021-07-06 19:20 ` [Bug rtl-optimization/101347] [11/12 Regression] ICE in cfg_layout_initialize with __builtin_setjmp and -fprofile-generate -fprofile-use pinskia at gcc dot gnu.org
2021-07-07  6:38 ` rguenth at gcc dot gnu.org [this message]
2021-07-07  6:38 ` rguenth at gcc dot gnu.org
2021-07-28  7:07 ` rguenth at gcc dot gnu.org
2022-04-21  7:49 ` rguenth at gcc dot gnu.org
2022-07-14 18:15 ` [Bug rtl-optimization/101347] [11/12/13 " amonakov at gcc dot gnu.org
2022-07-20 13:12 ` cvs-commit at gcc dot gnu.org
2022-07-20 13:15 ` [Bug rtl-optimization/101347] [11/12 " amonakov at gcc dot gnu.org
2022-07-27  7:18 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-101347-4-srAdSPkIR2@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).