[gcc r11-10589] libstdc++: Fix simd test compilation with Clang
Matthias Kretz
mkretz@gcc.gnu.org
Tue Mar 21 11:34:14 GMT 2023
https://gcc.gnu.org/g:e320611bc743ff3f681c1a1fa4acfbdcdea1f430
commit r11-10589-ge320611bc743ff3f681c1a1fa4acfbdcdea1f430
Author: Matthias Kretz <m.kretz@gsi.de>
Date: Thu Feb 23 14:45:07 2023 +0100
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.
(cherry picked from commit 25db59017f2e216a76c8a0fe4814568135f19f9a)
Diff:
---
libstdc++-v3/testsuite/experimental/simd/tests/operators.cc | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc b/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc
index 171bae5b05e..d0f5a1e5ce1 100644
--- a/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc
+++ b/libstdc++-v3/testsuite/experimental/simd/tests/operators.cc
@@ -223,7 +223,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;
More information about the Libstdc++-cvs
mailing list