[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / flang / test / Semantics / OpenMP / default.f90
bloba8d170724c12c963e545b710ce3fa29b7ca3a2c3
1 !RUN: %python %S/../test_errors.py %s %flang -fopenmp
2 ! OpenMP Version 4.5
3 ! 2.15.3.1 default Clause
4 program omp_default
5 integer :: a(10), b(10), c(10),i,k
6 !ERROR: At most one DEFAULT clause can appear on the PARALLEL directive
7 !$omp parallel default(shared), default(private)
8 do i = 1, 10
9 c(i) = a(i) + b(i) + k
10 end do
11 !$omp end parallel
13 !ERROR: At most one DEFAULT clause can appear on the TASK directive
14 !$omp task default(shared), default(none), shared(a,b,c,k,i)
15 do i = 1, 10
16 c(i) = a(i) + b(i) + k
17 end do
18 !$omp end task
20 !ERROR: At most one DEFAULT clause can appear on the TASKLOOP directive
21 !$omp taskloop default(shared), default(private)
22 do i = 1, 10
23 c(i) = a(i) + b(i) + k
24 end do
25 !$omp end taskloop
27 !ERROR: At most one DEFAULT clause can appear on the TEAMS directive
28 !$omp teams default(shared), default(none), shared(i,a,b,k,c)
29 do i = 1, 10
30 c(i) = a(i) + b(i) + k
31 end do
32 !$omp end teams
34 !$omp parallel
35 !ERROR: DEFAULT clause is not allowed on the DO directive
36 !$omp do default(private)
37 do i = 1, 10
38 k = i
39 end do
40 !$omp end do
41 !$omp end parallel
43 end program omp_default