1! RUN: %S/test_errors.sh %s %t %flang_fc1 -fopenmp
2! REQUIRES: shell
3! OpenMP Version 4.5
4! 2.7.1 Loop Construct
5! The DO loop iteration variable must be of type integer.
6
7program omp_do
8  real i, j, k
9  !$omp do
10  !ERROR: The DO loop iteration variable must be of the type integer.
11  do i = 1, 10
12    !ERROR: The DO loop iteration variable must be of the type integer.
13    do j = 1, 10
14      print *, "it", i, j
15    end do
16  end do
17  !$omp end do
18
19  !ERROR: The value of the parameter in the COLLAPSE or ORDERED clause must not be larger than the number of nested loops following the construct.
20  !$omp do collapse(3)
21  !ERROR: The DO loop iteration variable must be of the type integer.
22  do i = 1, 10
23    !ERROR: The DO loop iteration variable must be of the type integer.
24    do j = 1, 10
25      print *, "it", i, j
26    end do
27  end do
28  !$omp end do
29
30  !$omp do collapse(2)
31  !ERROR: The DO loop iteration variable must be of the type integer.
32  do i = 1, 10
33    !ERROR: The DO loop iteration variable must be of the type integer.
34    do j = 1, 10
35      print *, "it", i, j
36    end do
37  end do
38  !$omp end do
39
40end program omp_do
41