On Thu, Jul 16, 2026 at 12:23:19PM +0200, Tomasz Kaminski wrote:
> On Thu, Jul 16, 2026 at 12:04 PM Jonathan Wakely <[email protected]> wrote:
>
> > On Thu, 09 Jul 2026 at 15:41 +0200, Tomasz Kamiński wrote:
> > >The piecewise distributions previously always generated an double value
> >
> > "a double"
I'm seeing
/home/jakub/src/gcc/libstdc++-v3/testsuite/26_numerics/random/piecewise_linear_distribution/operators/serialize2.cc:81:
void test_custom() [with RealType = float]: Assertion 'res == expected' failed.
FAIL: 26_numerics/random/piecewise_linear_distribution/operators/serialize2.cc
-std=gnu++20 execution test
in my last i686-linux bootstrap/regtest.
I think
test_custom<float>();
+#ifdef __x86_64__
test_custom<double>();
+#endif
test_custom<long double>();
is not the right guard, I bet it isn't about non-x86_64, but about excess
precision, it should be
+#if __FLT_EVAL_METHOD__ == 0
test_custom<float>();
test_custom<double>();
+#endif
test_custom<long double>();
(or make sure to use -std=c++20 rather than -std=gnu++20 for the test
or -fexcess-precision=standard) and make sure that both the test and code
you are testing is excess precision ready (so, everywhere where it can't
tolerate excess precision has explicit casts or assignment to temporaries
of the narrower type).
Jakub