public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-1825] [PR middle-end/106432] Gracefully handle unsupported type in range_on_edge Date: Mon, 25 Jul 2022 15:31:45 +0000 (GMT) [thread overview] Message-ID: <20220725153145.8C12E3857809@sourceware.org> (raw) https://gcc.gnu.org/g:ca1e4b26c19351077db1d8e6ff1cb97f05bca79f commit r13-1825-gca1e4b26c19351077db1d8e6ff1cb97f05bca79f Author: Aldy Hernandez <aldyh@redhat.com> Date: Mon Jul 25 15:58:04 2022 +0200 [PR middle-end/106432] Gracefully handle unsupported type in range_on_edge A cleaner approach to fix this PR has been suggested by Andrew, which is to just return false on range_on_edge for unsupported range types. Tested on x86-64 Linux. PR middle-end/106432 gcc/ChangeLog: * gimple-range.cc (gimple_ranger::range_on_edge): Return false when the result range type is unsupported. Diff: --- gcc/gimple-range.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/gimple-range.cc b/gcc/gimple-range.cc index 7ac48303e4e..eb347eee45b 100644 --- a/gcc/gimple-range.cc +++ b/gcc/gimple-range.cc @@ -201,7 +201,9 @@ bool gimple_ranger::range_on_edge (vrange &r, edge e, tree name) { Value_Range edge_range (TREE_TYPE (name)); - gcc_checking_assert (r.supports_type_p (TREE_TYPE (name))); + + if (!r.supports_type_p (TREE_TYPE (name))) + return false; // Do not process values along abnormal edges. if (e->flags & EDGE_ABNORMAL)
reply other threads:[~2022-07-25 15:31 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220725153145.8C12E3857809@sourceware.org \ --to=aldyh@gcc.gnu.org \ --cc=gcc-cvs@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: linkBe 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).