1subroutine foo
2  integer :: A(10), B(10), C(10)
3  interface
4    integer function ibar(x)
5      integer :: x
6    end function ibar
7  end interface
8
9  !$omp parallel default(none)  ! { dg-note "enclosing 'parallel'" }
10  !$omp task affinity (iterator(j=ibar(0):ibar(1):ibar(2)) : a(ibar(j)), b(j), c(j))
11  !$omp end task
12  !$omp end parallel
13! { dg-error "'a' not specified in enclosing 'parallel'" "" { target *-*-* } .-3 }
14! { dg-error "'b' not specified in enclosing 'parallel'" "" { target *-*-* } .-4 }
15! { dg-error "'c' not specified in enclosing 'parallel'" "" { target *-*-* } .-5 }
16end
17