* tree-loop-distribution.c (struct partition): New field recording
[official-gcc.git] / gcc / testsuite / gfortran.dg / random_4.f90
blobe60698f49064e79c04a3dc34777d5da626b22b05
1 ! { dg-do run }
3 program trs
4 implicit none
5 integer :: size, ierr
6 integer, allocatable, dimension(:) :: seed, check
7 call test_random_seed(size)
8 allocate(seed(size),check(size))
9 seed = 42
10 call test_random_seed(put=seed)
11 call test_random_seed(get=check)
12 ! With xorshift1024* the last seed value is special
13 seed(size) = check(size)
14 if (any (seed /= check)) call abort
15 contains
16 subroutine test_random_seed(size, put, get)
17 integer, optional :: size
18 integer, dimension(:), optional :: put
19 integer, dimension(:), optional :: get
20 call random_seed(size, put, get)
21 end subroutine test_random_seed
22 end program trs