From patchwork Tue Mar 21 09:23:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthias Kretz X-Patchwork-Id: 72782 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1673800wrt; Tue, 21 Mar 2023 02:24:38 -0700 (PDT) X-Google-Smtp-Source: AK7set9FV0PXBY6UPGrBpamY5Z3kKftTvFfA9QVBjou8IpqEN1I0V4Z9J6Ie4coKsb6gTNxnqi/b X-Received: by 2002:a17:906:e2ca:b0:932:b7ce:2aaa with SMTP id gr10-20020a170906e2ca00b00932b7ce2aaamr2109540ejb.28.1679390678480; Tue, 21 Mar 2023 02:24:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679390678; cv=none; d=google.com; s=arc-20160816; b=AyYEjdPeLzNzajTo6C3ZIKhwEQZ1O55AM1KxEEWX4DfFk1quZKpUbIMmnGjWzKcBl1 r45gXNLNGxEdGIqAwngQas3AF/FX/mwl18DwyxT4nzFIO0NCMsMMyt6LBB0x1RXmBfF+ GMV6WVuwq52LzONGsfgtGiEVxtIjlyrjxidN/k9YlUNpbHctB5KmFiKmF91v4XJxiZm+ puNuFHDg+mDLwBPcs/Tg9J8IrQOE0iYUVUdDsoouPfS9c6QeBnL+z8xsrTe24BAQIT9o iQl0ES6jU4rvigTC+9ZuG+N/jNYx/Eg5wXrF0f5MZdFlg5bpJdh0kBiNgJ/pBc/LJMus LIJQ== 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 :organization:message-id:date:subject:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=uxqPb3Vz6b7EDQIgenq5w0DQzFUjsT6u8sxUoZ57AWE=; b=Y50yGf2g7sCTSjHm9C01HDOnVXARVQOlBQ471NwyLMKWXbZSLBEeGaOdjbiQnBNnG0 IyvSSxkgpgNF+FV31+UEmpdCAA93BOYArg+0BuVyVel37hK1Q8zXoOCL42+8k6SZRxBk gLkcdRSrhCpK0w1Pt0+ALimy5w0/WK0az6ANuwoeoxp4okpZVgNJZt8im05w3tmPAq7A SQTry2BfS/+2cJfG7A5FCC5Na7W6p+DNw4JhgjTagqqa8GFIvNV/L+1CtSOkW9YGeWT8 0sGaLCw/FOApiBYdEzZD5ozykjY5TSLmNlrrGf8m9VYmKWcO36ScSUxHhXNVKCAHYwQO cw8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=vkjvvIek; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id jy7-20020a170907762700b00932987332c3si7129190ejc.431.2023.03.21.02.24.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 02:24:38 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=vkjvvIek; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 CC033385B53C for ; Tue, 21 Mar 2023 09:23:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CC033385B53C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679390636; bh=uxqPb3Vz6b7EDQIgenq5w0DQzFUjsT6u8sxUoZ57AWE=; 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=vkjvvIek5UQFQIe127RDGkLCDoZdSQ46/dc82/o5qIz/2hhTPuzeI7N2IuHL6B+IQ 4lBzQIeSBhJiy6Ywya5jXWYpJLso7GaDm6GtWIsbAE4Nw62CzaIRM7/tM7R2zglWQq qZlgfI6v4AsA8c2Rx+2v6qceXY8dUjE1ccHRndws= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from lxmtout2.gsi.de (lxmtout2.gsi.de [140.181.3.112]) by sourceware.org (Postfix) with ESMTPS id DF22C385B51C; Tue, 21 Mar 2023 09:23:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DF22C385B51C Received: from localhost (localhost [127.0.0.1]) by lxmtout2.gsi.de (Postfix) with ESMTP id 138CC203E7FE; Tue, 21 Mar 2023 10:23:07 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at lxmtout2.gsi.de Received: from lxmtout2.gsi.de ([127.0.0.1]) by localhost (lxmtout2.gsi.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id nGSHoG0UtgaN; Tue, 21 Mar 2023 10:23:06 +0100 (CET) Received: from srvEX6.campus.gsi.de (unknown [10.10.4.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lxmtout2.gsi.de (Postfix) with ESMTPS id E7A40203E7FC; Tue, 21 Mar 2023 10:23:06 +0100 (CET) Received: from minbar.localnet (140.181.3.12) by srvEX6.campus.gsi.de (10.10.4.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Tue, 21 Mar 2023 10:23:06 +0100 To: , Subject: [PATCH 1/2] libstdc++: Fix simd test compilation with Clang Date: Tue, 21 Mar 2023 10:23:01 +0100 Message-ID: <12217370.T7Z3S40VBb@minbar> Organization: GSI Helmholtz Centre for Heavy Ion Research In-Reply-To: <6895974.e9J7NaK4W3@minbar> References: <6895974.e9J7NaK4W3@minbar> MIME-Version: 1.0 X-Originating-IP: [140.181.3.12] X-ClientProxiedBy: srvEX8.Campus.gsi.de (10.10.4.160) To srvEX6.campus.gsi.de (10.10.4.96) X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, BODY_8BITS, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, 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: Matthias Kretz via Gcc-patches From: Matthias Kretz Reply-To: Matthias Kretz 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?1760968759754210021?= X-GMAIL-MSGID: =?utf-8?q?1760968759754210021?= Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * testsuite/experimental/simd/tests/operators.cc: Clang doesn't define __GCC_IEC_559. Use __STDC_IEC_559__ instead. --- .../testsuite/experimental/simd/tests/operators.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- ────────────────────────────────────────────────────────────────────────── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Centre for Heavy Ion Research https://gsi.de stdₓ::simd ────────────────────────────────────────────────────────────────────────── diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc b/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc index c4d91fa5d2b..72af7061c73 100644 --- a/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc +++ b/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc @@ -211,7 +211,14 @@ test() } // divides - constexpr bool is_iec559 = __GCC_IEC_559 >= 2; + constexpr bool is_iec559 = +#ifdef __GCC_IEC_559 + __GCC_IEC_559 >= 2; +#elif defined __STDC_IEC_559__ + true; +#else + false; +#endif if constexpr (std::is_floating_point_v && !is_iec559) { // avoid testing subnormals and expect minor deltas for non-IEC559 float V x = 2;