[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / flang / test / Semantics / OpenMP / copyin02.f90
blob09b876677ea316e6d94da17ad0a3a163952656fd
1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp
2 ! OpenMP Version 4.5
3 ! 2.15.4.1 copyin Clause
4 ! A common block name that appears in a copyin clause must be declared to be
5 ! a common block in the same scoping unit in which the copyin clause appears.
7 subroutine copyin()
8 integer :: a = 10
9 common /cmn/ a
11 !$omp threadprivate(/cmn/)
12 call copyin_clause()
14 contains
16 subroutine copyin_clause()
17 !ERROR: COMMON block must be declared in the same scoping unit in which the OpenMP directive or clause appears
18 !$omp parallel copyin(/cmn/)
19 print *, a
20 !$omp end parallel
21 end subroutine copyin_clause
23 end subroutine copyin