[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / flang / test / Semantics / OpenMP / scan1.f90
blob9e8fc9dec1c6bf9cd78bac0249963ad37a2bb36a
1 ! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
3 subroutine test_scan()
4 integer x, y, k, z
6 !ERROR: Orphaned SCAN directives are prohibited; perhaps you forgot to enclose the directive in to a WORKSHARING LOOP, a WORKSHARING LOOP SIMD or a SIMD directive.
7 !ERROR: List item x must appear in REDUCTION clause with the INSCAN modifier of the parent directive
8 !$omp scan inclusive(x)
9 !$omp parallel do simd
10 do k = 1, n
11 !ERROR: UNTIED clause is not allowed on the SCAN directive
12 !$omp scan untied
13 end do
15 !$omp parallel do simd
16 do k = 1, n
17 !ERROR: Exactly one of EXCLUSIVE or INCLUSIVE clause is expected
18 !$omp scan
19 end do
21 !$omp parallel do simd reduction(inscan,+: x, y)
22 do k = 1, n
23 !ERROR: Exactly one of EXCLUSIVE or INCLUSIVE clause is expected
24 !$omp scan inclusive(x) exclusive(y)
25 end do
27 !ERROR: List item y must appear in EXCLUSIVE or INCLUSIVE clause of an enclosed SCAN directive
28 !$omp parallel do simd reduction(inscan,+: x, y)
29 do k = 1, n
30 !ERROR: Exactly one of EXCLUSIVE or INCLUSIVE clause is expected
31 !ERROR: List item z must appear in REDUCTION clause with the INSCAN modifier of the parent directive
32 !$omp scan inclusive(x) exclusive(z)
33 end do
34 end subroutine