https://gcc.gnu.org/g:e70070d4dc02515a8c9f9e4547e6bda8fe0b2623
commit r17-1668-ge70070d4dc02515a8c9f9e4547e6bda8fe0b2623 Author: Andrew MacLeod <[email protected]> Date: Thu Jun 18 10:45:39 2026 -0400 Do not check points-to in zero_p. checking pt_unknown_p() should not be needed, having a NULL condition should have no points to field set. Assert this is true. * value-range.h (prange::zero_p): Assert that is zero_p is true, points_to is unknown. Diff: --- gcc/value-range.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/value-range.h b/gcc/value-range.h index 0ab673030092..abed19d9209e 100644 --- a/gcc/value-range.h +++ b/gcc/value-range.h @@ -1424,7 +1424,10 @@ prange::contains_p (tree cst) const inline bool prange::zero_p () const { - return m_kind == VR_RANGE && m_min == 0 && m_max == 0 && pt_unknown_p (); + bool ret = m_kind == VR_RANGE && m_min == 0 && m_max == 0; + // if zero_p is true, there should be no points to info. + gcc_checking_assert (!ret || pt_unknown_p ()); + return ret; } inline bool
