From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 42496394C046 for ; Thu, 8 Apr 2021 15:12:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 42496394C046 Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-529-CRUHZu_BP1O3WOF9qSTKiw-1; Thu, 08 Apr 2021 11:12:24 -0400 X-MC-Unique: CRUHZu_BP1O3WOF9qSTKiw-1 Received: by mail-qv1-f69.google.com with SMTP id bl6so1318811qvb.9 for ; Thu, 08 Apr 2021 08:12:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7YFyvpgZAflrxtxiWgubtjK0UNBT12G6hqb+FUxhc34=; b=q+SALH3PT5ZfEkEdkmqs5coEyny3apcuqQDFv18sDBM3LgUXWf0BQl1fTjINvbUEZz Ev9r65hNfhQ2crVDLBrpn1M0JFeDGb1etKfEo6cC9i1uYQMlATy7DG8v9xFOwog5+x9e Iee/0/rNJ3iCy1UVOkhaAS0ZceAR2CmkgLfVOgwlxX7HB5SpVI73uVgNaiM/YbdnPUWt DkdwuBCMUnGmneUTdfO9gcAneD+NsDoyEiMkkYj2HdSGxvuY0VKrqFKtYmw+jR9m85DS 8fcWpgQBW1YiJuLx4LfjYXXolB9FaE+Cr/QcnJBgcMtFWMxXIZumdXvPvPYqDvcqHKra LPvA== X-Gm-Message-State: AOAM532pChtj3LAyDSZ3NP/5wIS/3bZi6XLMGAQ6DLDhPI+twXBFORYO 012VqQ+i/KlGxqO5CPO4Xg/ACpR2XBIVQROunMGRdJDp87HWgkzgNPkCw39YG0GLJwuqnwmaAlK TmLftyLdFq9F8/LE= X-Received: by 2002:a0c:ead2:: with SMTP id y18mr8773830qvp.54.1617894743961; Thu, 08 Apr 2021 08:12:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6Om7g/YUecZfCrcF1806qqK5kUYWiEjY+gAcLzM9YyYBAfiRNEDI4CvC/XgcjXDWolj+DqQ== X-Received: by 2002:a0c:ead2:: with SMTP id y18mr8773799qvp.54.1617894743673; Thu, 08 Apr 2021 08:12:23 -0700 (PDT) Received: from localhost.localdomain (ool-457d493a.dyn.optonline.net. [69.125.73.58]) by smtp.gmail.com with ESMTPSA id a8sm18330671qtx.9.2021.04.08.08.12.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Apr 2021 08:12:23 -0700 (PDT) From: Patrick Palka To: gcc-patches@gcc.gnu.org Cc: libstdc++@gcc.gnu.org, Patrick Palka Subject: [committed] libstdc++: Address remaining to_chars/long_double.cc FAILs [PR98384] Date: Thu, 8 Apr 2021 11:12:21 -0400 Message-Id: <20210408151221.3366132-1-ppalka@redhat.com> X-Mailer: git-send-email 2.31.1.189.g2e36527f23 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" X-Spam-Status: No, score=-16.2 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_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2021 15:12:27 -0000 This works around the remaining reported execution FAILs of this test on AIX, Solaris and Darwin. Eventually we should rewrite this test to be less fragile, but there's not enough time to do that for GCC 11. Tested on AIX, Solaris and x86_64-pc-linux-gnu, committed to trunk as "obvious". libstdc++-v3/ChangeLog: PR libstdc++/98384 * testsuite/20_util/to_chars/long_double.cc: Don't run the test on targets without a large long double. XFAIL the execution on targets with a non-conforming printf. --- .../testsuite/20_util/to_chars/long_double.cc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/testsuite/20_util/to_chars/long_double.cc b/libstdc++-v3/testsuite/20_util/to_chars/long_double.cc index 5c1f7136f21..22d42067d65 100644 --- a/libstdc++-v3/testsuite/20_util/to_chars/long_double.cc +++ b/libstdc++-v3/testsuite/20_util/to_chars/long_double.cc @@ -17,7 +17,23 @@ // is supported in C++14 as a GNU extension, but this test uses C++17 // hexadecimal floating-point literals. -// { dg-do run { target c++17 } } + +// When long double is larger than double, the long double to_chars overloads +// are partially implemented in terms of printf, so this test in turn uses +// printf to verify correctness these overloads. +// When long double == double, the long double to_chars overloads are simple +// wrappers around the corresponding double overloads. Since they don't go +// through printf, we can't portably verify their output by comparing it with +// that of printf, so it's simplest to just not run this test on such targets; +// correctness of these overloads is already implied by that of the double +// overloads. +// { dg-do run { target { c++17 && large_long_double } } } +// { dg-do compile { target { c++17 && { ! large_long_double } } } } + +// The system printf on these targets appear to be buggy. FIXME: Make this test +// more portable and robust to differences in system printf behavior. +// { dg-xfail-run-if "Non-conforming printf (see PR98384)" { *-*-solaris* *-*-darwin* } } + // { dg-require-effective-target ieee-floats } #include -- 2.31.1.189.g2e36527f23