https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95286
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- I don't think this is a bug, the result of uniform_real_distribution depends on floating point arithmetic which depends on optimisations. The output of the mt19937_64 engine is portable between different implementations, but the output of the distributions is not.