Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / OpenMP / default.f90
blob94de7fa46869274142086e7bdd70c2bd772f75a5
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 end program omp_default