aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2022-10-04 19:50:28 +0200
committerAldy Hernandez <aldyh@redhat.com>2022-10-04 19:52:52 +0200
commit87b0fe37a2a5916cd09586e2af83b8203f57612a (patch)
tree40f8fb5a6b67c9b25f8f1fba9d600cec32a6b59d
parent5aa18176add650f481b3b9becbefce6d392cc049 (diff)
downloadgcc-87b0fe37a2a5916cd09586e2af83b8203f57612a.zip
gcc-87b0fe37a2a5916cd09586e2af83b8203f57612a.tar.gz
gcc-87b0fe37a2a5916cd09586e2af83b8203f57612a.tar.bz2
Remove assert from set_nonzero_bits.
The assert removed by this patch was there to keep users from passing masks of incompatible types. The self tests are passing host wide ints down (set_nonzero_bits (-1)), which seem to be 32 bits, whereas some embedded targets have integer_type_node's of 16-bits. This is causing problems in m32c-elf, among others. I suppose there's no harm in passing a 32-bit mask, because set_nonzero_bits calls wide_int::from() to convert the mask to the appropriate type. So we can remove the assert. gcc/ChangeLog: * value-range.cc (irange::set_nonzero_bits): Remove assert.
-rw-r--r--gcc/value-range.cc1
1 files changed, 0 insertions, 1 deletions
diff --git a/gcc/value-range.cc b/gcc/value-range.cc
index afb26a4..a307559 100644
--- a/gcc/value-range.cc
+++ b/gcc/value-range.cc
@@ -2913,7 +2913,6 @@ irange::set_nonzero_bits (const wide_int_ref &bits)
{
gcc_checking_assert (!undefined_p ());
unsigned prec = TYPE_PRECISION (type ());
- gcc_checking_assert (prec == bits.get_precision ());
// Drop VARYINGs with a nonzero mask to a plain range.
if (m_kind == VR_VARYING && bits != -1)