[libcxx-commits] [libcxx] [WIP] [libcxx] PR testrun (ignore) (PR #123570)
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Apr 9 01:27:52 PDT 2025
https://github.com/mstorsjo updated https://github.com/llvm/llvm-project/pull/123570
>From 8c4cd6cbcd440035dca47d082b3a190629e29856 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
Date: Wed, 12 Mar 2025 22:44:09 +0200
Subject: [PATCH 1/2] [libcxx] [test] Fix the condition for long double hex
formatting
This test currently hardcodes which environments have got 80 bit
long doubles on x86_64; add a check for the actual size of
the long doubles as well.
This allows waiving this part of the test, if we have x86_64
setups in any of these environments, configured for a nonstandard
size of long doubles.
---
.../facet.num.put.members/put_long_double.hex.pass.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.hex.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.hex.pass.cpp
index b9b02f5ea7b67..26a93f6368360 100644
--- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.hex.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.hex.pass.cpp
@@ -1846,11 +1846,11 @@ void test1() {
void test2() {
std::locale lc = std::locale::classic();
std::locale lg(lc, new my_numpunct);
-#if (defined(__APPLE__) || defined(TEST_HAS_GLIBC) || defined(__MINGW32__)) && defined(__x86_64__)
+#if (defined(__APPLE__) || defined(TEST_HAS_GLIBC) || defined(__MINGW32__)) && defined(__x86_64__) && \
+ __LDBL_MANT_DIG__ == 64
// This test is failing on FreeBSD, possibly due to different representations
// of the floating point numbers.
- // This test is failing in MSVC environments, where long double is equal to regular
- // double, and instead of "0x9.32c05a44p+27", this prints "0x1.26580b4880000p+30".
+ // This test assumes that long doubles are x87 80 bit long doubles.
const my_facet f(1);
char str[200];
{
>From 4171f63b65978bfe4dbeec5dea72329993f76c67 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
Date: Wed, 9 Apr 2025 11:27:18 +0300
Subject: [PATCH 2/2] WIP: [libcxx] [test] Try to remove the OS specific checks
---
.../facet.num.put.members/put_long_double.hex.pass.cpp | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.hex.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.hex.pass.cpp
index 26a93f6368360..94908eb9a40ce 100644
--- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.hex.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.hex.pass.cpp
@@ -1846,10 +1846,7 @@ void test1() {
void test2() {
std::locale lc = std::locale::classic();
std::locale lg(lc, new my_numpunct);
-#if (defined(__APPLE__) || defined(TEST_HAS_GLIBC) || defined(__MINGW32__)) && defined(__x86_64__) && \
- __LDBL_MANT_DIG__ == 64
- // This test is failing on FreeBSD, possibly due to different representations
- // of the floating point numbers.
+#if defined(__x86_64__) && __LDBL_MANT_DIG__ == 64
// This test assumes that long doubles are x87 80 bit long doubles.
const my_facet f(1);
char str[200];
More information about the libcxx-commits
mailing list