[gcc r13-7400] libstdc++: Require tzdb support for chrono::zoned_time printer test

Jonathan Wakely redi@gcc.gnu.org
Thu Jun 1 22:43:56 GMT 2023


https://gcc.gnu.org/g:2162c2082d274a972c37f4dc10e8b171115bea65

commit r13-7400-g2162c2082d274a972c37f4dc10e8b171115bea65
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon May 15 20:36:03 2023 +0100

    libstdc++: Require tzdb support for chrono::zoned_time printer test
    
    libstdc++-v3/ChangeLog:
    
            * testsuite/libstdc++-prettyprinters/chrono.cc: Only test
            printer for chrono::zoned_time for cx11 ABI and tzdb effective
            target.
    
    (cherry picked from commit 151bad410218d266e16b90da0147d57f9d661c1a)

Diff:
---
 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<milliseconds> 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


More information about the Gcc-cvs mailing list