aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/range-op-float.cc12
-rw-r--r--gcc/range-op.cc4
-rw-r--r--gcc/range-op.h1
3 files changed, 16 insertions, 1 deletions
diff --git a/gcc/range-op-float.cc b/gcc/range-op-float.cc
index 229b9d2..23e0f5e 100644
--- a/gcc/range-op-float.cc
+++ b/gcc/range-op-float.cc
@@ -160,6 +160,12 @@ range_operator_float::op1_op2_relation (const irange &lhs ATTRIBUTE_UNUSED) cons
return VREL_VARYING;
}
+relation_kind
+range_operator_float::op1_op2_relation (const frange &lhs ATTRIBUTE_UNUSED) const
+{
+ return VREL_VARYING;
+}
+
// Return TRUE if OP1 is known to be free of NANs.
static inline bool
@@ -338,6 +344,7 @@ class foperator_equal : public range_operator_float
using range_operator_float::fold_range;
using range_operator_float::op1_range;
using range_operator_float::op2_range;
+ using range_operator_float::op1_op2_relation;
public:
bool fold_range (irange &r, tree type,
const frange &op1, const frange &op2,
@@ -444,6 +451,7 @@ class foperator_not_equal : public range_operator_float
{
using range_operator_float::fold_range;
using range_operator_float::op1_range;
+ using range_operator_float::op1_op2_relation;
public:
bool fold_range (irange &r, tree type,
const frange &op1, const frange &op2,
@@ -545,6 +553,7 @@ class foperator_lt : public range_operator_float
using range_operator_float::fold_range;
using range_operator_float::op1_range;
using range_operator_float::op2_range;
+ using range_operator_float::op1_op2_relation;
public:
bool fold_range (irange &r, tree type,
const frange &op1, const frange &op2,
@@ -660,6 +669,7 @@ class foperator_le : public range_operator_float
using range_operator_float::fold_range;
using range_operator_float::op1_range;
using range_operator_float::op2_range;
+ using range_operator_float::op1_op2_relation;
public:
bool fold_range (irange &r, tree type,
const frange &op1, const frange &op2,
@@ -767,6 +777,7 @@ class foperator_gt : public range_operator_float
using range_operator_float::fold_range;
using range_operator_float::op1_range;
using range_operator_float::op2_range;
+ using range_operator_float::op1_op2_relation;
public:
bool fold_range (irange &r, tree type,
const frange &op1, const frange &op2,
@@ -882,6 +893,7 @@ class foperator_ge : public range_operator_float
using range_operator_float::fold_range;
using range_operator_float::op1_range;
using range_operator_float::op2_range;
+ using range_operator_float::op1_op2_relation;
public:
bool fold_range (irange &r, tree type,
const frange &op1, const frange &op2,
diff --git a/gcc/range-op.cc b/gcc/range-op.cc
index 16fa1f4..f8255dd 100644
--- a/gcc/range-op.cc
+++ b/gcc/range-op.cc
@@ -4476,7 +4476,9 @@ range_op_handler::op1_op2_relation (const vrange &lhs) const
gcc_checking_assert (m_valid);
if (m_int)
return m_int->op1_op2_relation (as_a <irange> (lhs));
- return m_float->op1_op2_relation (as_a <irange> (lhs));
+ if (is_a <irange> (lhs))
+ return m_float->op1_op2_relation (as_a <irange> (lhs));
+ return m_float->op1_op2_relation (as_a <frange> (lhs));
}
// Cast the range in R to TYPE.
diff --git a/gcc/range-op.h b/gcc/range-op.h
index b2f063a..48adcec 100644
--- a/gcc/range-op.h
+++ b/gcc/range-op.h
@@ -160,6 +160,7 @@ public:
const frange &op2,
relation_kind = VREL_VARYING) const;
virtual relation_kind op1_op2_relation (const irange &lhs) const;
+ virtual relation_kind op1_op2_relation (const frange &lhs) const;
};
class range_op_handler