public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3246] Add stubs for floating point range-op tests. Date: Wed, 12 Oct 2022 06:51:44 +0000 (GMT) [thread overview] Message-ID: <20221012065144.C2892383FB89@sourceware.org> (raw) 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
reply other threads:[~2022-10-12 6:51 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221012065144.C2892383FB89@sourceware.org \ --to=aldyh@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).