[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / flang / test / Semantics / OpenMP / private-assoc.f90
blobbf50cd11de1724e8e3bc4850f8f45d9d630aeab1
1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp
3 ! The ASSOCIATE name preserves the association with the selector established
4 ! in the associate statement. Therefore it is incorrect to change the
5 ! data-sharing attribute of the name.
7 subroutine assoc_private(x)
8 integer :: x
9 associate(z => x)
10 !ERROR: Variable 'z' in ASSOCIATE cannot be in a PRIVATE clause
11 !$omp parallel private(z)
12 !$omp end parallel
13 end associate
14 end subroutine
16 subroutine assoc_firstprivate(x)
17 integer :: x
18 associate(z => x)
19 !ERROR: Variable 'z' in ASSOCIATE cannot be in a FIRSTPRIVATE clause
20 !$omp parallel firstprivate(z)
21 !$omp end parallel
22 end associate
23 end subroutine
25 subroutine assoc_lastprivate(x)
26 integer :: x
27 associate(z => x)
28 !ERROR: Variable 'z' in ASSOCIATE cannot be in a LASTPRIVATE clause
29 !$omp parallel sections lastprivate(z)
30 !$omp end parallel sections
31 end associate
32 end subroutine