aboutsummaryrefslogtreecommitdiff
path: root/gcc/value-range.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/value-range.h')
-rw-r--r--gcc/value-range.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/value-range.h b/gcc/value-range.h
index 1012d00..2442f8e 100644
--- a/gcc/value-range.h
+++ b/gcc/value-range.h
@@ -169,7 +169,6 @@ public:
// Deprecated legacy public methods.
tree min () const; // DEPRECATED
tree max () const; // DEPRECATED
- bool constant_p () const; // DEPRECATED
bool legacy_verbose_union_ (const class irange *); // DEPRECATED
bool legacy_verbose_intersect (const irange *); // DEPRECATED
@@ -692,7 +691,12 @@ inline unsigned
irange::num_pairs () const
{
if (m_kind == VR_ANTI_RANGE)
- return constant_p () ? 2 : 1;
+ {
+ bool constant_p = (TREE_CODE (min ()) == INTEGER_CST
+ && TREE_CODE (max ()) == INTEGER_CST);
+ gcc_checking_assert (constant_p);
+ return 2;
+ }
else
return m_num_ranges;
}