From 37a9529bcc8b2e550b39fff2f7b55ed578fb7e19 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 16 Apr 2026 16:08:45 +0100 Subject: [PATCH] libstdc++: Skip std::generate_canonical tests for IBM long double [PR124540] 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. --- .../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 de3b0213cf5..7ef81c65693 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(rng2, rng3, skips); VERIFY(skips == 0); +#endif } #ifndef _GLIBCXX_GENERATE_CANONICAL_STRICT # ifdef __SIZEOF_FLOAT128__