[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / flang / test / Semantics / OpenMP / copyin01.f90
blob0051b5d441f05b9ca457820212e0ae3d6ce920f4
1 ! RUN: %python %S/../test_errors.py %s %flang -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
6 program omp_copyin
8 integer :: i
9 integer, save :: k
10 integer :: a(10), b(10)
11 common /cmn/ j
13 k = 10
15 !ERROR: Non-THREADPRIVATE object 'k' in COPYIN clause
16 !$omp parallel do copyin(k)
17 do i = 1, 10
18 a(i) = k + i
19 j = j + a(i)
20 end do
21 !$omp end parallel do
23 print *, a
25 !ERROR: Non-THREADPRIVATE object 'j' in COPYIN clause
26 !$omp parallel do copyin(/cmn/)
27 do i = 1, 10
28 b(i) = a(i) + j
29 end do
30 !$omp end parallel do
32 print *, b
34 end program omp_copyin