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