From patchwork Wed Oct 12 06:50:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 1689050 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=bhF3beXZ; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MnNbd36f6z23k5 for ; Wed, 12 Oct 2022 17:51:24 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 299723850202 for ; Wed, 12 Oct 2022 06:51:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 299723850202 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665557481; bh=279HFKMU137X81B+8CgyXmW5JE93SfI1c8Siyo4z77Q=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=bhF3beXZOjdsMRbYzd6qHlChPv4waI7KgOpLG+Vkai1XqZ1z8cI6msQip2KlMuX4i GFetq8wKJxXoiaTkeLeTWKD1bgGYEuUmiFVtU4ILt3iAwF52fg+UMq6CRup/I1vyrN SwzcUhSmw5xkn4bEfcrsyM8r6qw8dLt1RQAArBTg= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 33FEE385DC16 for ; Wed, 12 Oct 2022 06:51:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 33FEE385DC16 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-479-n7Z6oTdaNSGWgktMUodvpw-1; Wed, 12 Oct 2022 02:50:59 -0400 X-MC-Unique: n7Z6oTdaNSGWgktMUodvpw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 817131C051AB for ; Wed, 12 Oct 2022 06:50:59 +0000 (UTC) Received: from abulafia.quesejoda.com (unknown [10.39.193.77]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5233E4A9265; Wed, 12 Oct 2022 06:50:56 +0000 (UTC) Received: from abulafia.quesejoda.com (localhost [127.0.0.1]) by abulafia.quesejoda.com (8.17.1/8.17.1) with ESMTPS id 29C6osp5412958 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 12 Oct 2022 08:50:54 +0200 Received: (from aldyh@localhost) by abulafia.quesejoda.com (8.17.1/8.17.1/Submit) id 29C6osik412957; Wed, 12 Oct 2022 08:50:54 +0200 To: GCC patches Subject: [COMMITTED] Add stubs for floating point range-op tests. Date: Wed, 12 Oct 2022 08:50:50 +0200 Message-Id: <20221012065050.412900-5-aldyh@redhat.com> In-Reply-To: <20221012065050.412900-1-aldyh@redhat.com> References: <20221012065050.412900-1-aldyh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Aldy Hernandez via Gcc-patches From: Aldy Hernandez Reply-To: Aldy Hernandez Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" 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. --- 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