[libstdc++,testsuite] xfail double-prec from_chars for float128_t

Message ID or8r1ef10j.fsf@lxoliva.fsfla.org
State Committed
Commit 5b178179e85ace01a97def40531e915c180aaeca
Headers
Series [libstdc++,testsuite] xfail double-prec from_chars for float128_t |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gcc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gcc_check--master-arm success Testing passed

Commit Message

Alexandre Oliva April 16, 2024, 3:18 a.m. UTC
  Tests 20_util/from_chars/4.cc and 20_util/to_chars/long_double.cc were
adjusted about a year ago to skip long double on some targets, because
the fastfloat library was limited to 64-bit doubles.

The same problem comes up in similar float128_t tests on
aarch64-vxworks.  This patch adjusts them similarly.

Unlike the earlier tests, that got similar treatment for
x86_64-vxworks, these haven't failed there.

Regstrapped on x86_64-linux-gnu.  Also tested with gcc-13 on arm-,
aarch64-, x86- and x86_64-vxworks7r2.  Ok to install?


for  libstdc++-v3/ChangeLog

	* testsuite/20_util/from_chars/8.cc: Skip float128_t testing
	on aarch64-vxworks.
	* testsuite/20_util/to_chars/float128-c++23.cc: Xfail run on
	aarch64-vxworks.
---
 libstdc++-v3/testsuite/20_util/from_chars/8.cc     |    3 ++-
 .../testsuite/20_util/to_chars/float128_c++23.cc   |    1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
  

Comments

Jonathan Wakely April 16, 2024, 6:38 a.m. UTC | #1
On Tue, 16 Apr 2024, 04:19 Alexandre Oliva, <oliva@adacore.com> wrote:

>
> Tests 20_util/from_chars/4.cc and 20_util/to_chars/long_double.cc were
> adjusted about a year ago to skip long double on some targets, because
> the fastfloat library was limited to 64-bit doubles.
>
> The same problem comes up in similar float128_t tests on
> aarch64-vxworks.  This patch adjusts them similarly.
>
> Unlike the earlier tests, that got similar treatment for
> x86_64-vxworks, these haven't failed there.
>
> Regstrapped on x86_64-linux-gnu.  Also tested with gcc-13 on arm-,
> aarch64-, x86- and x86_64-vxworks7r2.  Ok to install?
>

OK, thanks



>
> for  libstdc++-v3/ChangeLog
>
>         * testsuite/20_util/from_chars/8.cc: Skip float128_t testing
>         on aarch64-vxworks.
>         * testsuite/20_util/to_chars/float128-c++23.cc: Xfail run on
>         aarch64-vxworks.
> ---
>  libstdc++-v3/testsuite/20_util/from_chars/8.cc     |    3 ++-
>  .../testsuite/20_util/to_chars/float128_c++23.cc   |    1 +
>  2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/libstdc++-v3/testsuite/20_util/from_chars/8.cc
> b/libstdc++-v3/testsuite/20_util/from_chars/8.cc
> index ee60d88c332db..a6343422c5a91 100644
> --- a/libstdc++-v3/testsuite/20_util/from_chars/8.cc
> +++ b/libstdc++-v3/testsuite/20_util/from_chars/8.cc
> @@ -17,6 +17,7 @@
>
>  // { dg-do run { target c++23 } }
>  // { dg-add-options ieee }
> +// { dg-additional-options "-DSKIP_LONG_DOUBLE" { target
> aarch64-*-vxworks* } }
>
>  #include <charconv>
>  #include <string>
> @@ -343,7 +344,7 @@ test06()
>  #if defined(__STDCPP_FLOAT64_T__) &&
> defined(_GLIBCXX_DOUBLE_IS_IEEE_BINARY64)
>    test_max_mantissa<std::float64_t, unsigned long long>();
>  #endif
> -#if defined(__GLIBCXX_TYPE_INT_N_0) \
> +#if defined(__GLIBCXX_TYPE_INT_N_0) && !defined SKIP_LONG_DOUBLE \
>      && defined(__STDCPP_FLOAT128_T__) &&
> defined(_GLIBCXX_LDOUBLE_IS_IEEE_BINARY128)
>    test_max_mantissa<std::float128_t, unsigned __GLIBCXX_TYPE_INT_N_0>();
>  #endif
> diff --git a/libstdc++-v3/testsuite/20_util/to_chars/float128_c++23.cc
> b/libstdc++-v3/testsuite/20_util/to_chars/float128_c++23.cc
> index 547632817b4bb..ca00761ee7c98 100644
> --- a/libstdc++-v3/testsuite/20_util/to_chars/float128_c++23.cc
> +++ b/libstdc++-v3/testsuite/20_util/to_chars/float128_c++23.cc
> @@ -19,6 +19,7 @@
>  // { dg-require-effective-target ieee_floats }
>  // { dg-require-effective-target size32plus }
>  // { dg-add-options ieee }
> +// { dg-xfail-run-if "from_chars limited to double-precision" {
> aarch64-*-vxworks* } }
>
>  #include <charconv>
>  #include <stdfloat>
>
> --
> Alexandre Oliva, happy hacker            https://FSFLA.org/blogs/lxo/
>    Free Software Activist                   GNU Toolchain Engineer
> More tolerance and less prejudice are key for inclusion and diversity
> Excluding neuro-others for not behaving ""normal"" is *not* inclusive
>
  
Alexandre Oliva April 18, 2024, 11:10 a.m. UTC | #2
On Apr 16, 2024, Alexandre Oliva <oliva@adacore.com> wrote:

> 	* testsuite/20_util/to_chars/float128-c++23.cc: Xfail run on
> 	aarch64-vxworks.

FTR, here's the fixed ChangeLog entry I'm putting in: (s/-/_/)

 	* testsuite/20_util/to_chars/float128_c++23.cc: Xfail run on
 	aarch64-vxworks.
  

Patch

diff --git a/libstdc++-v3/testsuite/20_util/from_chars/8.cc b/libstdc++-v3/testsuite/20_util/from_chars/8.cc
index ee60d88c332db..a6343422c5a91 100644
--- a/libstdc++-v3/testsuite/20_util/from_chars/8.cc
+++ b/libstdc++-v3/testsuite/20_util/from_chars/8.cc
@@ -17,6 +17,7 @@ 
 
 // { dg-do run { target c++23 } }
 // { dg-add-options ieee }
+// { dg-additional-options "-DSKIP_LONG_DOUBLE" { target aarch64-*-vxworks* } }
 
 #include <charconv>
 #include <string>
@@ -343,7 +344,7 @@  test06()
 #if defined(__STDCPP_FLOAT64_T__) && defined(_GLIBCXX_DOUBLE_IS_IEEE_BINARY64)
   test_max_mantissa<std::float64_t, unsigned long long>();
 #endif
-#if defined(__GLIBCXX_TYPE_INT_N_0) \
+#if defined(__GLIBCXX_TYPE_INT_N_0) && !defined SKIP_LONG_DOUBLE \
     && defined(__STDCPP_FLOAT128_T__) && defined(_GLIBCXX_LDOUBLE_IS_IEEE_BINARY128)
   test_max_mantissa<std::float128_t, unsigned __GLIBCXX_TYPE_INT_N_0>();
 #endif
diff --git a/libstdc++-v3/testsuite/20_util/to_chars/float128_c++23.cc b/libstdc++-v3/testsuite/20_util/to_chars/float128_c++23.cc
index 547632817b4bb..ca00761ee7c98 100644
--- a/libstdc++-v3/testsuite/20_util/to_chars/float128_c++23.cc
+++ b/libstdc++-v3/testsuite/20_util/to_chars/float128_c++23.cc
@@ -19,6 +19,7 @@ 
 // { dg-require-effective-target ieee_floats }
 // { dg-require-effective-target size32plus }
 // { dg-add-options ieee }
+// { dg-xfail-run-if "from_chars limited to double-precision" { aarch64-*-vxworks* } }
 
 #include <charconv>
 #include <stdfloat>