public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Cc: danglin@gcc.gnu.org, sandra@gcc.gnu.org
Subject: [PATCH] PR libstdc++/78179 run long double tests separately
Date: Mon, 03 Sep 2018 14:54:00 -0000	[thread overview]
Message-ID: <20180903145430.GA11187@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 520 bytes --]

Split the long double testing into a separate file, so that we can XFAIL
targets where the long double precision doesn't meet the expected
tolerances. The float and double tests are still expefted to PASS for
all targets.

	PR libstdc++/78179
	* testsuite/26_numerics/headers/cmath/hypot-long-double.cc: New test
	that runs the long double part of hypot.cc.
	* testsuite/26_numerics/headers/cmath/hypot.cc: Disable long double
	tests unless TEST_HYPOT_LONG_DOUBLE is defined.

Tested x86_64-linux, committed to trunk.



[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 2925 bytes --]

commit f7369a2897f0d8ae014af88142b27569eecd3aa2
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon Sep 3 15:48:33 2018 +0100

    PR libstdc++/78179 run long double tests separately
    
    Split the long double testing into a separate file, so that we can XFAIL
    targets where the long double precision doesn't meet the expected
    tolerances. The float and double tests are still expefted to PASS for
    all targets.
    
            PR libstdc++/78179
            * testsuite/26_numerics/headers/cmath/hypot-long-double.cc: New test
            that runs the long double part of hypot.cc.
            * testsuite/26_numerics/headers/cmath/hypot.cc: Disable long double
            tests unless TEST_HYPOT_LONG_DOUBLE is defined.

diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
new file mode 100644
index 00000000000..8a054735ce9
--- /dev/null
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
@@ -0,0 +1,25 @@
+// Copyright (C) 2016-2018 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options "-std=gnu++17" }
+// { dg-do run { target c++17 } }
+// { dg-xfail-run-if "PR 78179" { powerpc-ibm-aix* hppa-*-linux* nios2-*-* } }
+
+// Run the long double tests from hypot.cc separately, because they fail on a
+// number of targets. See PR libstdc++/78179 for details.
+#define TEST_HYPOT_LONG_DOUBLE
+#include "hypot.cc"
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc
index 69840c8117a..36c7553c5e8 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc
@@ -17,7 +17,6 @@
 
 // { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
-// { dg-xfail-run-if "AIX long double" { powerpc-ibm-aix* } }
 
 #include <cmath>
 #include <type_traits>
@@ -126,9 +125,13 @@ const long double toler3 = 1e-16l;
 void
 test01()
 {
+  // See hypot-long-double.cc for this macro
+#ifndef TEST_HYPOT_LONG_DOUBLE
   test(data1, toler1);
   test(data2, toler2);
+#else
   test(data3, toler3);
+#endif
 }
 
 int

             reply	other threads:[~2018-09-03 14:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-03 14:54 Jonathan Wakely [this message]
2018-09-19 21:13 ` Christophe Lyon
2018-09-19 21:18   ` Rainer Orth
2018-09-20 13:40     ` Christophe Lyon
2018-09-20 14:22       ` Jonathan Wakely
2018-09-20 17:14         ` Christophe Lyon
2018-09-21  1:14         ` Hans-Peter Nilsson
2018-09-21 10:25           ` Richard Earnshaw (lists)
2018-09-21 10:39             ` Jonathan Wakely
2018-09-21 10:50               ` Richard Earnshaw (lists)
2018-09-21 11:36                 ` Jonathan Wakely
2018-09-21 14:01                   ` Hans-Peter Nilsson
2018-09-21 16:10                     ` Jonathan Wakely
2018-09-21 10:34           ` Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180903145430.GA11187@redhat.com \
    --to=jwakely@redhat.com \
    --cc=danglin@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    --cc=sandra@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).