public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/96130] [10/11 Regression] ICE in analyze_function_body at gcc/ipa-fnsummary.c:2769 since r10-3199-g351e7c3b5fbd45bd
Date: Mon, 13 Jul 2020 16:31:18 +0000	[thread overview]
Message-ID: <bug-96130-4-G6f2cBfzSF@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-96130-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:0d03c0ee5213703ec6d9ffa632fa5298d83adaaa

commit r10-8472-g0d03c0ee5213703ec6d9ffa632fa5298d83adaaa
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Mon Jul 13 18:25:53 2020 +0200

    ipa-fnsummary: Fix ICE with switch predicates [PR96130]

    The following testcase ICEs since r10-3199.
    There is a switch with default label, where the controlling expression has
    range just 0..7 and there are case labels for all those 8 values, but
    nothing has yet optimized away the default.
    Since r10-3199, set_switch_stmt_execution_predicate sets the switch to
    default label's edge's predicate to a false predicate and then
    compute_bb_predicates propagates the predicates through the cfg, but false
    predicates aren't really added.  The caller of compute_bb_predicates
    in one place handles NULL bb->aux as false predicate:
          if (fbi.info)
            {
              if (bb->aux)
                bb_predicate = *(predicate *) bb->aux;
              else
                bb_predicate = false;
            }
          else
            bb_predicate = true;
    but then in two further spots that the patch below is changing
    it assumes bb->aux must be non-NULL.  Those two spots are guarded by a
    condition that is only true if fbi.info is non-NULL, so I think the right
    fix is to treat NULL aux as false predicate in those spots too.

    2020-07-13  Jakub Jelinek  <jakub@redhat.com>

            PR ipa/96130
            * ipa-fnsummary.c (analyze_function_body): Treat NULL bb->aux
            as false predicate.

            * gcc.dg/torture/pr96130.c: New test.

    (cherry picked from commit 776e48e0931db69f158f40e5cb8e15463d879a42)

  parent reply	other threads:[~2020-07-13 16:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09  8:33 [Bug c/96130] New: 10.1.1: segfault during IPA pass: fnsummary manuel.lauss at googlemail dot com
2020-07-09  8:37 ` [Bug c/96130] " marxin at gcc dot gnu.org
2020-07-09  8:45 ` [Bug ipa/96130] [10/11 Regression] ICE in analyze_function_body at gcc/ipa-fnsummary.c:2769 since r10-3199-g351e7c3b5fbd45bd marxin at gcc dot gnu.org
2020-07-09  8:56 ` marxin at gcc dot gnu.org
2020-07-09 11:37 ` rguenth at gcc dot gnu.org
2020-07-10 13:38 ` marxin at gcc dot gnu.org
2020-07-10 13:47 ` jakub at gcc dot gnu.org
2020-07-10 14:13 ` jakub at gcc dot gnu.org
2020-07-10 14:18 ` jakub at gcc dot gnu.org
2020-07-11 13:25 ` jakub at gcc dot gnu.org
2020-07-13 16:27 ` cvs-commit at gcc dot gnu.org
2020-07-13 16:31 ` cvs-commit at gcc dot gnu.org [this message]
2020-07-13 16:34 ` jakub 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-96130-4-G6f2cBfzSF@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).