]> git.ipfire.org Git - thirdparty/gcc.git/commit
Remove assert from set_nonzero_bits.
authorAldy Hernandez <aldyh@redhat.com>
Tue, 4 Oct 2022 17:50:28 +0000 (19:50 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Tue, 4 Oct 2022 17:52:52 +0000 (19:52 +0200)
commit87b0fe37a2a5916cd09586e2af83b8203f57612a
tree40f8fb5a6b67c9b25f8f1fba9d600cec32a6b59d
parent5aa18176add650f481b3b9becbefce6d392cc049
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.
gcc/value-range.cc