aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/value-range.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/value-range.cc b/gcc/value-range.cc
index ddbcdd6..e1066f4 100644
--- a/gcc/value-range.cc
+++ b/gcc/value-range.cc
@@ -1260,6 +1260,9 @@ irange::operator== (const irange &other) const
if (m_num_ranges != other.m_num_ranges)
return false;
+ if (m_num_ranges == 0)
+ return true;
+
for (unsigned i = 0; i < m_num_ranges; ++i)
{
tree lb = tree_lower_bound (i);