diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2024-02-13 10:07:11 -0500 |
---|---|---|
committer | Andrew MacLeod <amacleod@redhat.com> | 2024-04-30 17:19:58 -0400 |
commit | 7b3ac57852052822e3845bcd8d50b83d7724dfde (patch) | |
tree | 59aec9438aea4be3a444099b613163539a2416a7 | |
parent | 39fe620963b29e7bdc8dcfa2037490df26b4edf2 (diff) |
Remove incorrect asserts.
Gimple_range_op handles builtin functions, and a couple of asserts that
are in place are incorrect in this context, so just remove them.
* gimple-range-op.cc (gimple_range_op_handler::calc_op1): Don't
assert that here are less than 3 operands.
(gimple_range_op_handler::maybe_builtin_call): Simply return if
there is no type for the function call.
-rw-r--r-- | gcc/gimple-range-op.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/gimple-range-op.cc b/gcc/gimple-range-op.cc index 9c50c00549e..587de186db2 100644 --- a/gcc/gimple-range-op.cc +++ b/gcc/gimple-range-op.cc @@ -178,7 +178,6 @@ gimple_range_op_handler::gimple_range_op_handler (gimple *s) bool gimple_range_op_handler::calc_op1 (vrange &r, const vrange &lhs_range) { - gcc_checking_assert (gimple_num_ops (m_stmt) < 3); // Give up on empty ranges. if (lhs_range.undefined_p ()) return false; @@ -1213,7 +1212,8 @@ gimple_range_op_handler::maybe_builtin_call () if (func == CFN_LAST) return; tree type = gimple_range_type (call); - gcc_checking_assert (type); + if (!type) + return; if (!Value_Range::supports_type_p (type)) return; |