1! RUN: %S/test_errors.sh %s %t %f18 -fopenmp
2! OpenMP Version 4.5
3! 2.15.4.1 copyin Clause
4! A list item that appears in a copyin clause must be threadprivate
5
6program omp_copyin
7
8  integer :: i
9  integer, save :: j, k
10  integer :: a(10), b(10)
11
12  !$omp threadprivate(j, k)
13
14  j = 20
15  k = 10
16
17  !$omp parallel do copyin(j, k)
18  do i = 1, 10
19    a(i) = k + i
20    b(i) = j + i
21  end do
22  !$omp end parallel do
23
24  print *, a, b
25
26end program omp_copyin
27