!RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.15.3.1 default Clause
program omp_default
integer :: a(10), b(10), c(10),i,k
!ERROR: At most one DEFAULT clause can appear on the PARALLEL directive
!$omp parallel default(shared), default(private)
do i = 1, 10
c(i) = a(i) + b(i) + k
end do
!$omp end parallel
!ERROR: At most one DEFAULT clause can appear on the TASK directive
!$omp task default(shared), default(none), shared(a,b,c,k,i)
do i = 1, 10
c(i) = a(i) + b(i) + k
end do
!$omp end task
!ERROR: At most one DEFAULT clause can appear on the TASKLOOP directive
!$omp taskloop default(shared), default(private)
do i = 1, 10
c(i) = a(i) + b(i) + k
end do
!$omp end taskloop
!ERROR: At most one DEFAULT clause can appear on the TEAMS directive
!$omp teams default(shared), default(none), shared(i,a,b,k,c)
do i = 1, 10
c(i) = a(i) + b(i) + k
end do
!$omp end teams
!$omp parallel
!ERROR: DEFAULT clause is not allowed on the DO directive
!$omp do default(private)
do i = 1, 10
k = i
end do
!$omp end do
!$omp end parallel
end program omp_default