annotate gcc/testsuite/gfortran.dg/random_7.f90 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do run }
kono
parents:
diff changeset
2 ! { dg-options "-fdefault-integer-8" }
kono
parents:
diff changeset
3 !
kono
parents:
diff changeset
4 program trs
kono
parents:
diff changeset
5 implicit none
kono
parents:
diff changeset
6 integer :: size, ierr
kono
parents:
diff changeset
7 integer, allocatable, dimension(:) :: seed, check
kono
parents:
diff changeset
8 call test_random_seed(size)
kono
parents:
diff changeset
9 allocate(seed(size),check(size))
kono
parents:
diff changeset
10 seed(:) = huge(seed) / 17
kono
parents:
diff changeset
11 call test_random_seed(put=seed)
kono
parents:
diff changeset
12 call test_random_seed(get=check)
kono
parents:
diff changeset
13 ! In the current xorshift1024* implementation the last seed value is
kono
parents:
diff changeset
14 ! special
kono
parents:
diff changeset
15 seed(size) = check(size)
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
16 if (any (seed /= check)) STOP 1
111
kono
parents:
diff changeset
17 contains
kono
parents:
diff changeset
18 subroutine test_random_seed(size, put, get)
kono
parents:
diff changeset
19 integer, optional :: size
kono
parents:
diff changeset
20 integer, dimension(:), optional :: put
kono
parents:
diff changeset
21 integer, dimension(:), optional :: get
kono
parents:
diff changeset
22 call random_seed(size, put, get)
kono
parents:
diff changeset
23 end subroutine test_random_seed
kono
parents:
diff changeset
24 end program trs