aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Kretz <m.kretz@gsi.de>2023-02-23 14:45:07 +0100
committerMatthias Kretz <m.kretz@gsi.de>2023-03-21 12:31:43 +0100
commit25db59017f2e216a76c8a0fe4814568135f19f9a (patch)
tree41ed42c5cd0ddc7318ef30a0b2e448fac41cd0bb
parent03041e0361cbdd7f541f2f39060759aad866ed58 (diff)
downloadgcc-25db59017f2e216a76c8a0fe4814568135f19f9a.zip
gcc-25db59017f2e216a76c8a0fe4814568135f19f9a.tar.gz
gcc-25db59017f2e216a76c8a0fe4814568135f19f9a.tar.bz2
libstdc++: Fix simd test compilation with Clang
Signed-off-by: Matthias Kretz <m.kretz@gsi.de> libstdc++-v3/ChangeLog: * testsuite/experimental/simd/tests/operators.cc: Clang doesn't define __GCC_IEC_559. Use __STDC_IEC_559__ instead.
-rw-r--r--libstdc++-v3/testsuite/experimental/simd/tests/operators.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc b/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc
index c4d91fa..72af706 100644
--- a/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc
+++ b/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc
@@ -211,7 +211,14 @@ template <typename V>
}
// divides
- constexpr bool is_iec559 = __GCC_IEC_559 >= 2;
+ constexpr bool is_iec559 =
+#ifdef __GCC_IEC_559
+ __GCC_IEC_559 >= 2;
+#elif defined __STDC_IEC_559__
+ true;
+#else
+ false;
+#endif
if constexpr (std::is_floating_point_v<T> && !is_iec559)
{ // avoid testing subnormals and expect minor deltas for non-IEC559 float
V x = 2;