public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-1825] [PR middle-end/106432] Gracefully handle unsupported type in range_on_edge
@ 2022-07-25 15:31 Aldy Hernandez
0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2022-07-25 15:31 UTC (permalink / raw)
To: gcc-cvs
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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-25 15:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-25 15:31 [gcc r13-1825] [PR middle-end/106432] Gracefully handle unsupported type in range_on_edge Aldy Hernandez
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).