| 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 |
| 14 |
|
| 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 |
| 25 |
|
| 26 |
!$omp parallel do collapse(2) |
| 27 |
do i = 1, 3 |
| 28 |
!ERROR: Loop control is not present in the DO LOOP |
| 29 |
!ERROR: The associated loop of a loop-associated directive cannot be a DO without control. |
| 30 |
do |
| 31 |
end do |
| 32 |
end do |
| 33 |
end program omp_doCollapse |
| 34 |
|