aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2018-09-21 16:36:53 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2018-09-21 16:36:53 +0100
commitac51f07ad2703824d12523856d6fb1ec333a0a0b (patch)
treed7b9642ab9741aad802939c068839f7988cc3b4e
parentc8d1534ec95645e5f2fc4d6374a36517ea996f98 (diff)
downloadgcc-ac51f07ad2703824d12523856d6fb1ec333a0a0b.zip
gcc-ac51f07ad2703824d12523856d6fb1ec333a0a0b.tar.gz
gcc-ac51f07ad2703824d12523856d6fb1ec333a0a0b.tar.bz2
Un-split hypot<long double> tests
Remove the hypot-long-double.cc file that used dg-xfail-run-if and simply use the lower tolerance for double if long double is not larger than double. * testsuite/26_numerics/headers/cmath/hypot-long-double.cc: Remove. * testsuite/26_numerics/headers/cmath/hypot.cc: Restore test for long double unconditionally, but use lower tolerance when sizeof(long double) == sizeof(double). From-SVN: r264483
-rw-r--r--libstdc++-v3/ChangeLog7
-rw-r--r--libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc25
-rw-r--r--libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc9
3 files changed, 11 insertions, 30 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index eb6710f..161ea11 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,10 @@
+2018-09-21 Jonathan Wakely <jwakely@redhat.com>
+
+ * testsuite/26_numerics/headers/cmath/hypot-long-double.cc: Remove.
+ * testsuite/26_numerics/headers/cmath/hypot.cc: Restore test for
+ long double unconditionally, but use lower tolerance when
+ sizeof(long double) == sizeof(double).
+
2018-09-20 Christophe Lyon <christophe.lyon@linaro.org>
* testsuite/26_numerics/headers/cmath/hypot-long-double.cc: Skip
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
deleted file mode 100644
index bcc1fec..0000000
--- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot-long-double.cc
+++ /dev/null
@@ -1,25 +0,0 @@
-// 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" { arm*-*-* hppa-*-linux* nios2-*-* powerpc-ibm-aix* } }
-
-// 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 36c7553..9fe8f53 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/cmath/hypot.cc
@@ -125,13 +125,12 @@ 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
+ if (sizeof(long double) > sizeof(double))
+ test(data3, toler3);
+ else
+ test(data3, (long double)toler1);
}
int