On Fri, Jul 17, 2026 at 11:52:21AM +0200, Tomasz Kamiński wrote:
> As pointed out by Jakub, the use of excess precision is most likely source
> of differences.
> 
> libstdc++-v3/ChangeLog:
> 
>       * 
> testsuite/26_numerics/random/piecewise_constant_distribution/operators/serialize2.cc:
>       Guard test_custom invocations with __FLT_EVAL_METHOD__ macros.
>       * 
> testsuite/26_numerics/random/piecewise_linear_distribution/operators/serialize2.cc:
>       Guard test_custom invocations with __FLT_EVAL_METHOD__ macros.
> ---
> Jakub could you check if that fixes the issue for you?
> Test are passing with -m32 on my machine, but they were also yesterday.

IMHO either don't include <cfloat>, or use FLT_EVAL_METHOD instead of
__FLT_EVAL_METHOD__.
The latter is compiler predefined macro used in float.h
  #define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
the former is the standard macro defined by that header.

I've tested that this patch with s/__FLT_EVAL_METHOD__/FLT_EVAL_METHOD/g
fixed
FAIL: 26_numerics/random/piecewise_linear_distribution/operators/serialize2.cc  
-std=gnu++20 execution test
I was seeing with
make check 
RUNTESTFLAGS=conformance.exp=piecewise_*_distribution/operators/serialize2.cc
on i686-linux.
If you are testing with -m32, the thing is that you are most likely using
SSE2 and default to fpmath=sse.
You can test --target_board=unix/-m32/-mno-sse/-mfp-math=387 or configure
your compiler to default to that, e.g. --with-arch-32=i686 

        Jakub

Reply via email to