]> git.ipfire.org Git - thirdparty/gcc.git/commit
Check if constant is a member before returning it.
authorAndrew MacLeod <amacleod@redhat.com>
Tue, 10 Jun 2025 16:11:18 +0000 (12:11 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Tue, 10 Jun 2025 16:31:30 +0000 (12:31 -0400)
commit6a4da727020b24b02b062f4bff718c9a5699629c
tree21cbb800142268f3090f81efadb80f8f56576fc3
parent70c3dd9a81cdefcaf24a66ec0c1ceddf5d3984dd
Check if constant is a member before returning it.

set_range_from_bitmask checks the new bitmask, and if it is a constant,
simply returns the constant.  It never checks if that constant is
actually within the range.  If it is not, the result should be UNDEFINED.

* value-range.cc (irange::set_range_from_bitmask): When the bitmask
result is a singleton, check if it is contained in the range.
gcc/value-range.cc