| 1 |
! RUN: not %flang -fsyntax-only -fopenmp %s 2>&1 | FileCheck %s |
| 2 |
! REQUIRES: shell |
| 3 |
! OpenMP Version 4.5 |
| 4 |
! 2.7.1 Loop Construct |
| 5 |
! No statement in the associated loops other than the DO statements |
| 6 |
! can cause a branch out of the loops |
| 7 |
|
| 8 |
program omp_do |
| 9 |
integer i, j, k |
| 10 |
|
| 11 |
!$omp do |
| 12 |
do i = 1, 10 |
| 13 |
do j = 1, 10 |
| 14 |
print *, "Hello" |
| 15 |
!CHECK: invalid branch leaving an OpenMP structured block |
| 16 |
goto 10 |
| 17 |
end do |
| 18 |
end do |
| 19 |
!$omp end do |
| 20 |
|
| 21 |
!CHECK: Outside the enclosing DO directive |
| 22 |
10 stop |
| 23 |
|
| 24 |
end program omp_do |