2 ! { dg-options "-fopenmp" }
5 integer :: i
, j
, k
, a(1:3, 4:6, 5:7)
9 !$omp threadprivate (thr)
12 !$omp parallel do collapse(4) schedule(static, 4) ! { dg-error "not enough DO loops for collapsed" }
16 a(i
, j
, k
) = i
+ j
+ k
20 !$omp parallel do collapse(2)
22 do j
= i
+ 1, 7, i
! { dg-error "loop increment not in canonical form" }
25 !$omp parallel do collapse(2) shared(j)
27 do j
= 4, 6 ! { dg-error "iteration variable present on clause other than PRIVATE, LASTPRIVATE or ALLOCATE" }
30 !$omp parallel do collapse(2)
36 !$omp parallel do collapse(2) ! { dg-error "not enough DO loops" }
41 !$omp parallel do collapse(2)
43 do r
= 4, 6 ! { dg-warning "must be integer" }
46 end subroutine collapse1
48 subroutine collapse1_2
50 !$omp parallel do collapse(2)
51 do i
= -6, 6 ! { dg-error "cannot be redefined inside loop beginning" }
52 do i
= 4, 6 ! { dg-error "iteration variable used in more than one loop|cannot be redefined" }
55 end subroutine collapse1_2
57 ! { dg-error "iteration variable must be of type integer" "integer" { target *-*-* } 43 }