1subroutine foo
2  implicit none
3  external bar
4  integer :: i, b(10)
5  !$omp task depend(in : bar(1)) ! { dg-error "not a variable" }
6  !!$omp end task
7  !$omp task depend(out : b(1.0))  ! { dg-warning "Legacy Extension: REAL array index" }
8  !$omp end task
9  !$omp task depend( iterator( real :: i=1.0:5:1), in : b(i))  ! { dg-error "Expected INTEGER type" }
10  !!$omp end task
11  !$omp task depend(iterator(i=1.0:5:1), out : b(i))  ! { dg-error "Scalar integer expression for range begin expected" }
12  !$omp end task
13  !$omp task depend(iterator(i=1:5.0:1), in : b(i))  ! { dg-error "Scalar integer expression for range end expected" }
14  !$omp end task
15  !$omp task depend(iterator(i=1:5:1.0), in : b(i))  ! { dg-error "Scalar integer expression for range step expected" }
16  !$omp end task
17  !$omp task depend(iterator(j=1:3:5, i=1:5:0), out : b(i))  ! { dg-error "Nonzero range step expected" }
18  !$omp end task
19  !$omp task depend(iterator(=1:5:0), in : b(i))  ! { dg-error "Expected identifier" }
20  !!$omp end task
21  !$omp task depend(iterator(b(2)=1:5:1), in : b(i))  ! { dg-error "Failed to match clause" }
22  !!$omp end task
23  !$omp task depend(iterator(i=1:5:0, i=4:6), out: b(i))  ! { dg-error "Same identifier 'i' specified again" }
24  !!$omp end task
25  !$omp task depend(iterator(i=1) ,out: b(i))  ! { dg-error "Expected range-specification" }
26  !!$omp end task
27end
28