The IBM128 long double format isn't foldable in constant expressions, so
conditionally skip the std::complex<long double> cases when they'll
fail.
PR libstdc++/88204
* testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
test std::complex<long double> if long double format is IBM128.
* testsuite/26_numerics/complex/requirements/more_constexpr.cc:
Likewise.
Tested powerpc64le-linux, committed to trunk.
commit c65bdd73e81a0867c2384975b9d7d11fd3665e37
Author: Jonathan Wakely <[email protected]>
Date: Wed Jan 9 09:25:24 2019 +0000
PR libstdc++/88204 disable std::complex<long double> tests
The IBM128 long double format isn't foldable in constant expressions, so
conditionally skip the std::complex<long double> cases when they'll
fail.
PR libstdc++/88204
* testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
test std::complex<long double> if long double format is IBM128.
* testsuite/26_numerics/complex/requirements/more_constexpr.cc:
Likewise.
diff --git
a/libstdc++-v3/testsuite/26_numerics/complex/operators/more_constexpr.cc
b/libstdc++-v3/testsuite/26_numerics/complex/operators/more_constexpr.cc
index 725e789d334..3def7db2551 100644
--- a/libstdc++-v3/testsuite/26_numerics/complex/operators/more_constexpr.cc
+++ b/libstdc++-v3/testsuite/26_numerics/complex/operators/more_constexpr.cc
@@ -56,7 +56,9 @@ int main()
{
__gnu_test::test_operators<float>();
__gnu_test::test_operators<double>();
+#ifndef __LONG_DOUBLE_IBM128__ // IBM128 format is not constexpr foldable
__gnu_test::test_operators<long double>();
+#endif
return 0;
}
diff --git
a/libstdc++-v3/testsuite/26_numerics/complex/requirements/more_constexpr.cc
b/libstdc++-v3/testsuite/26_numerics/complex/requirements/more_constexpr.cc
index 4b17d421023..670378dc0c3 100644
--- a/libstdc++-v3/testsuite/26_numerics/complex/requirements/more_constexpr.cc
+++ b/libstdc++-v3/testsuite/26_numerics/complex/requirements/more_constexpr.cc
@@ -23,7 +23,6 @@
namespace __gnu_test
{
-
// Test constexpr real(val) imag(val).
template<typename _Tp, const int _Val = 42>
inline void
@@ -160,9 +159,11 @@ int main()
__gnu_test::test_operator_members<double, float>();
__gnu_test::test_operator_members<double, double>();
__gnu_test::test_operator_members<double, long double>();
+#ifndef __LONG_DOUBLE_IBM128__ // IBM128 format is not constexpr foldable
__gnu_test::test_operator_members<long double, float>();
__gnu_test::test_operator_members<long double, double>();
__gnu_test::test_operator_members<long double, long double>();
+#endif
#if defined(_GLIBCXX_USE_FLOAT128)
// Test primary template.