public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-3246] Add stubs for floating point range-op tests.
@ 2022-10-12  6:51 Aldy Hernandez
  0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2022-10-12  6:51 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:1c0670c62fc7c7b610876e61bf971ea1db19680e

commit r13-3246-g1c0670c62fc7c7b610876e61bf971ea1db19680e
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Tue Oct 11 17:23:33 2022 +0200

    Add stubs for floating point range-op tests.
    
    gcc/ChangeLog:
    
            * range-op-float.cc (frange_float): New.
            (range_op_float_tests): New.
            * range-op.cc (range_op_tests): Call range_op_float_tests.

Diff:
---
 gcc/range-op-float.cc | 26 ++++++++++++++++++++++++++
 gcc/range-op.cc       |  3 +++
 2 files changed, 29 insertions(+)

diff --git a/gcc/range-op-float.cc b/gcc/range-op-float.cc
index 71cdd112b86..22b7418c197 100644
--- a/gcc/range-op-float.cc
+++ b/gcc/range-op-float.cc
@@ -1612,3 +1612,29 @@ floating_op_table::set (enum tree_code code, range_operator_float &op)
   gcc_checking_assert (m_range_tree[code] == NULL);
   m_range_tree[code] = &op;
 }
+
+#if CHECKING_P
+#include "selftest.h"
+
+namespace selftest
+{
+
+// Build an frange from string endpoints.
+
+inline frange
+frange_float (const char *lb, const char *ub, tree type = float_type_node)
+{
+  REAL_VALUE_TYPE min, max;
+  gcc_assert (real_from_string (&min, lb) == 0);
+  gcc_assert (real_from_string (&max, ub) == 0);
+  return frange (type, min, max);
+}
+
+void
+range_op_float_tests ()
+{
+}
+
+} // namespace selftest
+
+#endif // CHECKING_P
diff --git a/gcc/range-op.cc b/gcc/range-op.cc
index 4d5a033dfa5..16fa1f4f46d 100644
--- a/gcc/range-op.cc
+++ b/gcc/range-op.cc
@@ -4829,6 +4829,9 @@ range_op_tests ()
   range_op_bitwise_and_tests ();
   range_op_cast_tests ();
   range_relational_tests ();
+
+  extern void range_op_float_tests ();
+  range_op_float_tests ();
 }
 
 } // namespace selftest

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-12  6:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-12  6:51 [gcc r13-3246] Add stubs for floating point range-op tests Aldy Hernandez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).