diff options
Diffstat (limited to 'gcc/value-range.cc')
-rw-r--r-- | gcc/value-range.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/value-range.cc b/gcc/value-range.cc index ed3760f..e2d75f5 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -2268,7 +2268,11 @@ irange::set_range_from_bitmask () // If all the bits are known, this is a singleton. if (m_bitmask.mask () == 0) { - set (m_type, m_bitmask.value (), m_bitmask.value ()); + // Make sure the singleton is within the range. + if (contains_p (m_bitmask.value ())) + set (m_type, m_bitmask.value (), m_bitmask.value ()); + else + set_undefined (); return true; } |