[libc-commits] [libc] [libc] Disable -NaN test on float128 systems (PR #70146)
via libc-commits
libc-commits at lists.llvm.org
Tue Oct 24 16:41:27 PDT 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: None (michaelrj-google)
<details>
<summary>Changes</summary>
Some float128 systems (specifically the ones used for aarch64 buildbots)
don't respect signs for long double NaNs. This patch disables the printf
test that was failing due to this.
---
Full diff: https://github.com/llvm/llvm-project/pull/70146.diff
1 Files Affected:
- (modified) libc/test/src/stdio/sprintf_test.cpp (+4)
``````````diff
diff --git a/libc/test/src/stdio/sprintf_test.cpp b/libc/test/src/stdio/sprintf_test.cpp
index 5aa346c414b1fe1..a68ee97d6d6edc4 100644
--- a/libc/test/src/stdio/sprintf_test.cpp
+++ b/libc/test/src/stdio/sprintf_test.cpp
@@ -1008,8 +1008,12 @@ TEST_F(LlvmLibcSPrintfTest, FloatDecimalConv) {
written = LIBC_NAMESPACE::sprintf(buff, "%Lf", ld_nan);
ASSERT_STREQ_LEN(written, buff, "nan");
+// Some float128 systems (specifically the ones used for aarch64 buildbots)
+// don't respect signs for long double NaNs.
+#if defined(SPECIAL_X86_LONG_DOUBLE) || defined(LONG_DOUBLE_IS_DOUBLE)
written = LIBC_NAMESPACE::sprintf(buff, "%LF", -ld_nan);
ASSERT_STREQ_LEN(written, buff, "-NAN");
+#endif
// Length Modifier Tests.
``````````
</details>
https://github.com/llvm/llvm-project/pull/70146
More information about the libc-commits
mailing list