Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / OpenMP / do-collapse.f90
blob145b7b75d28dfcce7aee789cbb96d2a9e44757bb
1 !RUN: %python %S/../test_errors.py %s %flang -fopenmp
2 ! OpenMP Version 4.5
3 ! 2.7.1 Collapse Clause
4 program omp_doCollapse
5 integer:: i,j
6 !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.
7 !$omp do collapse(3)
8 do i = 1,10
9 do j = 1, 10
10 print *, "hello"
11 end do
12 end do
13 !$omp end do
15 do i = 1,10
16 do j = 1, 10
17 !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.
18 !$omp do collapse(2)
19 do k = 1, 10
20 print *, "hello"
21 end do
22 !$omp end do
23 end do
24 end do
26 !$omp parallel do collapse(2)
27 do i = 1, 3
28 !ERROR: Loop control is not present in the DO LOOP
30 end do
31 end do
32 end program omp_doCollapse