https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91414
--- Comment #5 from Janne Blomqvist <jb at gcc dot gnu.org> --- Author: jb Date: Tue Aug 13 08:42:43 2019 New Revision: 274362 URL: https://gcc.gnu.org/viewcvs?rev=274362&root=gcc&view=rev Log: PR fortran/91414 Improve initialization of PRNG As part of PR 91414 an improved PRNG was contributed to trunk. This is a partial backport of some related changes to the PRNG. Namely when seeding the PRNG, it needs only 8 bytes of randomness from the OS, and uses a simple splitmix64 PRNG to fill in the rest of the state, instead of getting all the state from the OS. This can be useful for operating systems that can run out of entropy. libgfortran/ChangeLog: 2019-08-13 Janne Blomqvist <j...@gcc.gnu.org> Partial backport from trunk PR fortran/91414 * intrinsics/random.c (lcg_parkmiller): Replace with splitmix64. (splitmix64): New function. (getosrandom): Fix return value, simplify. (init_rand_state): Use getosrandom only to get 8 bytes, splitmix64 to fill rest of state. Modified: branches/gcc-9-branch/libgfortran/ChangeLog branches/gcc-9-branch/libgfortran/intrinsics/random.c