aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/value-range.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/value-range.cc b/gcc/value-range.cc
index 86550f1..6b4f3dd 100644
--- a/gcc/value-range.cc
+++ b/gcc/value-range.cc
@@ -340,8 +340,12 @@ frange::set (tree type,
REAL_VALUE_TYPE max_repr = frange_val_max (m_type);
if (real_less (&m_min, &min_repr))
m_min = min_repr;
+ else if (real_less (&max_repr, &m_min))
+ m_min = max_repr;
if (real_less (&max_repr, &m_max))
m_max = max_repr;
+ else if (real_less (&m_max, &min_repr))
+ m_max = min_repr;
}
// Check for swapped ranges.