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: 1947 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp2466738wrs; Tue, 11 Oct 2022 23:52:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4dkaLTFlgshCGJ6Ky+u2J3ndaDmZfXTbyNRO5hWNVQ2QeDMzkKw74G2mOUQvEn+vqU43UJ X-Received: by 2002:aa7:c78d:0:b0:454:fe1d:8eb1 with SMTP id n13-20020aa7c78d000000b00454fe1d8eb1mr26484068eds.59.1665557556082; Tue, 11 Oct 2022 23:52:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665557556; cv=none; d=google.com; s=arc-20160816; b=RL/nUh0NVBUA423D0pOHCCrBPZ9GH2FHjFB3mZtkAiBVKArW+JuvEdHBKxbYNoV/Y+ YuIeuuyXOSUaiudcPp0dJ+sreU4Xq33OFuqbIL7aLoNXbPj09L2HCIRXcNoTWaHa8FE/ MjAgMyDWHzj0iqz7YHltMd3lAi4lFag22Yxkx8ptIqPemckakd/sd9WVqjSArnPAl/xD hOMRE4FIQ+UAKO7GAfEqbeZ+HO1+hiahNeyCklkQuMc09gjEaobwFv8ItUMoLs9NGdWz 8DbC9srjjvDEFLZRf1SSyGvffuFHJPMloSEUlyu6QyjkxjGPRI5DCStWdxmv5pAtj76n vviw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=279HFKMU137X81B+8CgyXmW5JE93SfI1c8Siyo4z77Q=; b=j5wm72Ej3O1hA+RJlqKenAMucEyLSkZyGKsEXjrjGKxv3b909JTGx4S8Tk4ii3/0E1 hXEob3RgEg5+R1y0wsyNeEjbI5H3uLo4IYB9kppUEVe+deQodt5jy5ivBtfBXM8MDx9Q E7imrlFxdpM2Zon0fnI+fdkSwBTQLEh1QpULCkPy54nheITzWSQfbY66PEIAraHhGXPh KSrD15gq0NVsJihPwTnS/xyAov5L4g1VPXq8flZGzDuY2HqG3BanB3JnDwXm9rpsY1+y xftBDKbL8lKQ/UKjj2pteLclrrTqg8HfoSEi/dsftloM2QWyZA7eUUOCB2i15GeGP0uO fdzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=q5eIp+hS; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id k7-20020a170906a38700b0077b7d7d5838si11149167ejz.293.2022.10.11.23.52.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 23:52:36 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=q5eIp+hS; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 91B8F383FBBD for ; Wed, 12 Oct 2022 06:51:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 91B8F383FBBD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665557505; 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=q5eIp+hSi0ocAYTFbiRwrayczeZQB9S+JL3eHdGMqwzmEIiDQQmwOSeXdWHQR0uEE 4A0naim/+2oq93or8fsqj8ATzgl6I2vwnDFFBp23FKVEhgyz3BPZ5QU34xB3cW41UJ kA6OUmKPLYdjv/JotXenvqhU40EW/S3mhMUJDo9I= 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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746463679997086018?= X-GMAIL-MSGID: =?utf-8?q?1746463679997086018?= 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