From patchwork Tue May 16 09:07:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 94549 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp282090vqo; Tue, 16 May 2023 02:08:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ51xUCsndHx96/Y5zkbG3qfmTUsKMPzx9WbeLtVn7RsICejqj9C9IU6LrOe08CVJHwy+lTb X-Received: by 2002:a17:906:fd8e:b0:961:a67:28d with SMTP id xa14-20020a170906fd8e00b009610a67028dmr33632514ejb.22.1684228098657; Tue, 16 May 2023 02:08:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684228098; cv=none; d=google.com; s=arc-20160816; b=mkqpacIPbXapsV7CfH0Bj4BSlGld129fNnzqzw3Vnq3gnMYvOoL9IB32HLX/yVmNOQ ONgY6I3Yv+AdDsIZNXfRrB64MgBNh54fVcB+mLSKdwwi5d4d9cpdNUUaHUAjYnJ9A1PN VXYpnsatx5ZxOhiTOzUIl8ow0xTOy74+UIRyQARxyJorVmcPNQCqtvBCjWa3YQTHpPgG x8XKWccb44GY2HFD0UcGssF5F9EP1e8dgwzRcrzrvTVN3IBnvf1FOD5+gOI9sBsv8rF2 qwsZB6j7J7dCr5mrUigckX124Chj4gHfopB4syaMnQMiEI3EoEYtoH3mn+zu0rxqqttB t/yg== 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:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=Lys469ZRgDGbvzUhD4huYoqXSDH91hvsz8M6yq6sR6Q=; b=B/y2Y8n25LzIXZGpphOuCQxUYxxd915Ss3mDIckN8s809t2Neq/PLXBD9Gryhqe3lv QQkkMo/+lY12ejBuwsTgeKJcr3mBb+AaoFcM7P8xakqbl1M+Rkiw3Qmva1gJokT1ePsV t4VTBEy9AylgjMtMYlQsWiaYoUB8sssumKYb2WWY5yqe6gRW2kRmZyxAfNEIVFGTcoSr Nm9HvxzYLJtKhXXpE+MYvhHTMMm3DJ84+xUqdThZYsFmHfo66QprlVvEA8WqAzVHQm8q yDvSytzG4RR/Ho6h4MoYP+33eUIipPLLzlyXKzLum+jLIzKKBT6/CSKyQF8+k8GIKhZ+ vGuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ek9pnHp6; 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 (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id d23-20020aa7c1d7000000b0050bc508a980si11418671edp.670.2023.05.16.02.08.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 02:08:18 -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=ek9pnHp6; 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 0A65D385416C for ; Tue, 16 May 2023 09:08:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A65D385416C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684228081; bh=Lys469ZRgDGbvzUhD4huYoqXSDH91hvsz8M6yq6sR6Q=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ek9pnHp661AVL6r/B0w0DwU4ZMdn2XoveR0bdju9eww3AYmbiQYYcCJtQTHleMPNG qzpw0ZjHnz169vBcRm+T6OIuQXEDNNeSZNWnfvbFZONbzFINH+6SMqV4f5Yd34Tp3J FZeIrnicOFS6HP9/LIMvJ7sK9SDMfPxKESt5Gqbw= 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 7817E385700B for ; Tue, 16 May 2023 09:07:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7817E385700B Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-587-wW1OW2HROVC5z9_JwvJpxQ-1; Tue, 16 May 2023 05:07:10 -0400 X-MC-Unique: wW1OW2HROVC5z9_JwvJpxQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 74C1A185A7A2; Tue, 16 May 2023 09:07:10 +0000 (UTC) Received: from localhost (unknown [10.42.28.178]) by smtp.corp.redhat.com (Postfix) with ESMTP id 005571121314; Tue, 16 May 2023 09:07:09 +0000 (UTC) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Require tzdb support for chrono::zoned_time printer test Date: Tue, 16 May 2023 10:07:08 +0100 Message-Id: <20230516090708.1698284-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.8 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, T_SCC_BODY_TEXT_LINE 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: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely 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?1766041162949485077?= X-GMAIL-MSGID: =?utf-8?q?1766041162949485077?= Tested powerpc64le-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * testsuite/libstdc++-prettyprinters/chrono.cc: Only test printer for chrono::zoned_time for cx11 ABI and tzdb effective target. --- libstdc++-v3/testsuite/libstdc++-prettyprinters/chrono.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/chrono.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/chrono.cc index 01a46169393..b5314e025cc 100644 --- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/chrono.cc +++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/chrono.cc @@ -1,5 +1,6 @@ // { dg-options "-g -O0 -std=gnu++2a" } // { dg-do run { target c++2a } } +// { dg-additional-options "-DTEST_ZONED_TIME" { target tzdb } } // Copyright The GNU Toolchain Authors. // @@ -38,7 +39,7 @@ main() utc_time utc(467664h); // { dg-final { note-test utc {std::chrono::utc_time = { 467664h }} } } -#if _GLIBCXX_USE_CXX11_ABI +#if _GLIBCXX_USE_CXX11_ABI && defined TEST_ZONED_TIME zoned_time zt("Europe/London", half_past_epoch); // { dg-final { note-test zt {std::chrono::zoned_time = { "Europe/London" 1800000ms [1970-01-01 00:30:00] }} { target cxx11_abi } } } #endif