diff options
author | Janne Blomqvist <jb@gcc.gnu.org> | 2016-08-19 17:12:32 +0300 |
---|---|---|
committer | Janne Blomqvist <jb@gcc.gnu.org> | 2016-08-19 17:12:32 +0300 |
commit | 91151a7334543817f1f790310a1bfc4589889cad (patch) | |
tree | 3dd25be020bc1f538120f175d6ec7627ccda7699 /gcc/predict.c | |
parent | f0c90610e3e0646b89ae3e4b20134dc7e1cd7d12 (diff) | |
download | gcc-91151a7334543817f1f790310a1bfc4589889cad.zip gcc-91151a7334543817f1f790310a1bfc4589889cad.tar.gz gcc-91151a7334543817f1f790310a1bfc4589889cad.tar.bz2 |
Always initialize PRNG using random data from the OS.
libgfortran:
2016-08-16 Janne Blomqvist <jb@gcc.gnu.org>
* intrinsics/random.c (master_init): New variable.
(init_rand_state): Move below getosrandom (), maybe initialize
master_state.
(random_seed_i4): If called with no arguments, set master_init to
false, and reinitialize. If called with PUT=, set master_init to
true.
(random_seed_i8): Likewise.
testsuite:
2016-08-16 Janne Blomqvist <jb@gcc.gnu.org>
* gfortran.dg/random_4.f90: Initialize seed before using, handle
the last special seed value.
* gfortran.dg/random_7.f90: Use size for last array member instead
of hardcoded value.
From-SVN: r239611
Diffstat (limited to 'gcc/predict.c')
0 files changed, 0 insertions, 0 deletions