aboutsummaryrefslogtreecommitdiff
path: root/gcc/range-op-float.cc
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2023-06-09 13:37:11 -0400
committerAndrew MacLeod <amacleod@redhat.com>2023-06-09 20:33:02 -0400
commit4f0ac5a526180fb2b64ed7ea41acdaab8b91a8bb (patch)
treeb0258124c93b17288022a4110a639c949ca3cf11 /gcc/range-op-float.cc
parentb073d8af944119c4429b243c09eac612f22d1e83 (diff)
downloadgcc-4f0ac5a526180fb2b64ed7ea41acdaab8b91a8bb.zip
gcc-4f0ac5a526180fb2b64ed7ea41acdaab8b91a8bb.tar.gz
gcc-4f0ac5a526180fb2b64ed7ea41acdaab8b91a8bb.tar.bz2
Unify operator_cst range operator
Move the declaration of the class to the range-op-mixed header, add the floating point prototypes as well, and use it in the new unified table. * range-op-float.cc (operator_cst::fold_range): New. * range-op-mixed.h (class operator_cst): Move from integer file. * range-op.cc (op_cst): New object. (unified_table::unified_table): Add op_cst. Also use for REAL_CST. (class operator_cst): Move to range-op-mixed.h. (integral_table::integral_table): Remove op_cst. (pointer_table::pointer_table): Remove op_cst.
Diffstat (limited to 'gcc/range-op-float.cc')
-rw-r--r--gcc/range-op-float.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/range-op-float.cc b/gcc/range-op-float.cc
index bc8ecc6..11d76f2 100644
--- a/gcc/range-op-float.cc
+++ b/gcc/range-op-float.cc
@@ -557,6 +557,13 @@ operator_identity::op1_range (frange &r, tree, const frange &lhs,
return true;
}
+bool
+operator_cst::fold_range (frange &r, tree, const frange &op1,
+ const frange &, relation_trio) const
+{
+ r = op1;
+ return true;
+}
bool
operator_equal::op2_range (frange &r, tree type,