From: Janne Blomqvist Date: Tue, 13 Aug 2019 09:04:18 +0000 (+0300) Subject: PR fortran/91414 Bugfix for previous commit X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f77d27597dd0556c2a788476f52cf7ef4a5c44be;p=gcc.git PR fortran/91414 Bugfix for previous commit Correctly fill master_seed from os_seed. From-SVN: r274365 --- diff --git a/libgfortran/intrinsics/random.c b/libgfortran/intrinsics/random.c index cad21fedb57..dd2c46e7ef5 100644 --- a/libgfortran/intrinsics/random.c +++ b/libgfortran/intrinsics/random.c @@ -358,7 +358,10 @@ init_rand_state (prng_state* rs, const bool locked) uint64_t os_seed; getosrandom (&os_seed, sizeof (os_seed)); for (uint64_t i = 0; i < sizeof (master_state) / sizeof (uint64_t); i++) - master_state[i] = splitmix64 (os_seed); + { + os_seed = splitmix64 (os_seed); + master_state[i] = os_seed; + } njumps = 0; master_init = true; }