1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
!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
end program omp_default
|