https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100081
--- Comment #5 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- (In reply to Richard Biener from comment #4) > Or > > bool > irange::symbolic_p () const > { > return (!varying_p () > && !undefined_p () > && (!is_gimple_min_invariant (min ()) > || !is_gimple_min_invariant (max ()))); > } > > which should be simply > > bool > irange::symbolic_p () const > { > return (m_num_ranges == 1 > && (!is_gimple_min_invariant (min ()) > || !is_gimple_min_invariant (max ()))); > } > > ? Or do we have symbolic anti ranges represented with two ranges? > > Likewise > > bool > irange::constant_p () const > { > return (!varying_p () > && !undefined_p () > && TREE_CODE (min ()) == INTEGER_CST > && TREE_CODE (max ()) == INTEGER_CST); > } > > err - I thought varying == constant... Those varying_p checks definitely look suspect. You should be able to just look at the min/max as you suggest. However, the undefined_p check must stay because it is really a check for num_ranges > 0, otherwise in the case of undefined_p, the is_gimple_*_invariant would dereference m_base[] which has nothing of interest. Perhaps a more obvious check would be m_num_ranges > 0, instead of the confusing undefined_p.