comparison gcc/testsuite/gfortran.dg/random_seed_1.f90 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
8 ! 8 !
9 9
10 PROGRAM random_seed_1 10 PROGRAM random_seed_1
11 IMPLICIT NONE 11 IMPLICIT NONE
12 12
13 INTEGER, PARAMETER :: nbytes = 128 13 ! Should match sizeof(master_state) in
14 ! libgfortran/intrinsics/random.c
15 INTEGER, PARAMETER :: nbytes = 32
14 16
15 ! +1 due to the special 'p' value in xorshift1024*
16 ! '+1' to avoid out-of-bounds warnings 17 ! '+1' to avoid out-of-bounds warnings
17 INTEGER, PARAMETER :: n = nbytes / KIND(n) + 2 18 INTEGER, PARAMETER :: n = nbytes / KIND(n) + 1
18 INTEGER, DIMENSION(n) :: seed 19 INTEGER, DIMENSION(n) :: seed
19 20
20 ! Get seed, array too small 21 ! Get seed, array too small
21 CALL RANDOM_SEED(GET=seed(1:(n-2))) ! { dg-error "too small" } 22 CALL RANDOM_SEED(GET=seed(1:(n-2))) ! { dg-error "too small" }
22 23