1! { dg-do run } 2! Check that array constructors using non-compile-time 3! iterators are handled correctly. 4program main 5 implicit none 6 call init_random_seed 7contains 8 SUBROUTINE init_random_seed() 9 INTEGER :: i, n, clock 10 INTEGER, DIMENSION(:), ALLOCATABLE :: seed 11 12 CALL RANDOM_SEED(size = n) 13 ALLOCATE(seed(n)) 14 15 CALL SYSTEM_CLOCK(COUNT=clock) 16 17 seed = clock + 37 * (/ (i - 1, i = 1, n) /) 18 CALL RANDOM_SEED(PUT = seed) 19 20 DEALLOCATE(seed) 21 END SUBROUTINE init_random_seed 22end program main 23