summaryrefslogtreecommitdiff
path: root/libc/test/src/__support/FPUtil/fpbits_test.cpp
diff options
context:
space:
mode:
authorMichael Jones <michaelrj@google.com>2024-11-12 12:52:08 -0800
committerGitHub <noreply@github.com>2024-11-12 12:52:08 -0800
commit6aa74038588ed47e3fc0d829c1e7538cc110ba39 (patch)
tree0975b11708d888c5b4a53c2934c87294c2285685 /libc/test/src/__support/FPUtil/fpbits_test.cpp
parent014455a58762331b8eb7962c60bd64168c49f3b4 (diff)
[libc] Fix fpbits test running 80bit ld everywhere (#115937)
After #115084 the 80 bit long double tests error if sizeof(long double) isn't 96 or 128 bits. This caused failures in long double is double systems (since long double is 64 bits) so I've disabled the 80 bit long double tests on systems that don't use them.
Diffstat (limited to 'libc/test/src/__support/FPUtil/fpbits_test.cpp')
-rw-r--r--libc/test/src/__support/FPUtil/fpbits_test.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libc/test/src/__support/FPUtil/fpbits_test.cpp b/libc/test/src/__support/FPUtil/fpbits_test.cpp
index edb04c24ae38..6953d3aace58 100644
--- a/libc/test/src/__support/FPUtil/fpbits_test.cpp
+++ b/libc/test/src/__support/FPUtil/fpbits_test.cpp
@@ -124,6 +124,7 @@ TEST(LlvmLibcFPBitsTest, FPType_IEEE754_Binary128) {
UInt128(Rep::quiet_nan()));
}
+#ifdef LIBC_TYPES_LONG_DOUBLE_IS_X86_FLOAT80
TEST(LlvmLibcFPBitsTest, FPType_X86_Binary80) {
using Rep = FPRep<FPType::X86_Binary80>;
@@ -269,6 +270,7 @@ TEST(LlvmLibcFPBitsTest, FPType_X86_Binary80_IsNan) {
#error "unhandled long double type"
#endif
}
+#endif // LIBC_TYPES_LONG_DOUBLE_IS_X86_FLOAT80
enum class FP {
ZERO,