| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
implicit none |
| 4 |
integer :: a, b, i |
| 5 |
a = 0 |
| 6 |
|
| 7 |
!$omp parallel reduction(foo,+:a) ! { dg-error "26: Failed to match clause" } |
| 8 |
do i=1,10 |
| 9 |
a = a + 1 |
| 10 |
end do |
| 11 |
!$omp end parallel ! { dg-error "Unexpected !.OMP END PARALLEL statement" } |
| 12 |
|
| 13 |
!$omp parallel reduction(task +:a) ! { dg-error "30: Comma expected at" } |
| 14 |
do i=1,10 |
| 15 |
a = a + 1 |
| 16 |
end do |
| 17 |
!$omp end parallel ! { dg-error "Unexpected !.OMP END PARALLEL statement" } |
| 18 |
|
| 19 |
!$omp task in_reduction(foo,+:a) ! { dg-error "25: Failed to match clause" } |
| 20 |
a = a + 1 |
| 21 |
!$omp end task ! { dg-error "Unexpected !.OMP END TASK statement" } |
| 22 |
|
| 23 |
!$omp taskloop reduction(inscan,+:a) in_reduction(+:b) ! { dg-error "'inscan' REDUCTION clause on construct other than DO, SIMD, DO SIMD, PARALLEL DO, PARALLEL DO SIMD" } |
| 24 |
! { dg-error "35: With INSCAN at .1., expected loop body with ..OMP SCAN between two structured block sequences" "" { target *-*-* } .-1 } |
| 25 |
! { dg-error "'inscan' and non-'inscan' 'reduction' clauses on the same construct" "" { target *-*-* } .-2 } |
| 26 |
do i=1,10 |
| 27 |
a = a + 1 |
| 28 |
end do |
| 29 |
|
| 30 |
!$omp taskloop reduction(task,+:a) in_reduction(+:b) ! { dg-error "33: Only DEFAULT permitted as reduction-modifier in REDUCTION clause" } |
| 31 |
do i=1,10 |
| 32 |
a = a + 1 |
| 33 |
end do |
| 34 |
|
| 35 |
!$omp teams reduction(inscan,+:b) ! { dg-error "'inscan' REDUCTION clause on construct other than DO, SIMD, DO SIMD, PARALLEL DO, PARALLEL DO SIMD" } |
| 36 |
a = a + 1 |
| 37 |
!$omp end teams |
| 38 |
|
| 39 |
!$omp teams reduction(task, +:b) ! { dg-error "31: Only DEFAULT permitted as reduction-modifier in REDUCTION clause" } |
| 40 |
a = a + 1 |
| 41 |
!$omp end teams |
| 42 |
|
| 43 |
!$omp parallel reduction(inscan,+:a) ! { dg-error "'inscan' REDUCTION clause on construct other than DO, SIMD, DO SIMD, PARALLEL DO, PARALLEL DO SIMD" } |
| 44 |
do i=1,10 |
| 45 |
a = a + 1 |
| 46 |
end do |
| 47 |
!$omp end parallel |
| 48 |
|
| 49 |
!$omp parallel |
| 50 |
!$omp sections reduction(inscan,+:a) ! { dg-error "'inscan' REDUCTION clause on construct other than DO, SIMD, DO SIMD, PARALLEL DO, PARALLEL DO SIMD" } |
| 51 |
!$omp section |
| 52 |
a = a + 1 |
| 53 |
!$omp end sections |
| 54 |
!$omp end parallel |
| 55 |
|
| 56 |
|
| 57 |
end |