[committed] libstdc++: Skip std::generate_canonical tests for IBM long double [PR124540]

Jonathan Wakely jwakely@redhat.com
Fri Apr 17 09:16:14 GMT 2026


This tests assumes IEEE semantics, so fails on POWER with IBM long
double format. Just skip the long double part of the test.

libstdc++-v3/ChangeLog:

	PR libstdc++/124540
	* testsuite/26_numerics/random/uniform_real_distribution/operators/gencanon.cc:
	Skip long double tests for IBM long double format.
---

Tested powerpc64-linux-gnu and aarch64-linug-gnu.

Pushed to trunk.

 .../random/uniform_real_distribution/operators/gencanon.cc      | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/operators/gencanon.cc b/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/operators/gencanon.cc
index de3b0213cf57..7ef81c656934 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/operators/gencanon.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/uniform_real_distribution/operators/gencanon.cc
@@ -201,11 +201,13 @@ test00()
     VERIFY(skips == 0);
   }
   { // long double
+#if __LDBL_MANT_DIG__ != 106 // disable this for IBM double double
     int skips{};
     auto rng2{rng};
     auto rng3{rng};
     test01<long double>(rng2, rng3, skips);
     VERIFY(skips == 0);
+#endif
   }
 #ifndef _GLIBCXX_GENERATE_CANONICAL_STRICT
 #  ifdef __SIZEOF_FLOAT128__
-- 
2.53.0



More information about the Libstdc++ mailing list