| 1 |
! RUN: not %flang -fsyntax-only -fopenmp %s 2>&1 | FileCheck %s |
| 2 |
! OpenMP Version 4.5 |
| 3 |
! 2.5 parallel construct. |
| 4 |
! A program that branches into or out of a parallel region |
| 5 |
! is non-conforming. |
| 6 |
|
| 7 |
program omp_parallel |
| 8 |
integer i, j, k |
| 9 |
|
| 10 |
!$omp parallel |
| 11 |
do i = 1, 10 |
| 12 |
do j = 1, 10 |
| 13 |
print *, "Hello" |
| 14 |
!CHECK: invalid branch leaving an OpenMP structured block |
| 15 |
goto 10 |
| 16 |
end do |
| 17 |
end do |
| 18 |
!$omp end parallel |
| 19 |
|
| 20 |
!CHECK: Outside the enclosing PARALLEL directive |
| 21 |
10 stop |
| 22 |
|
| 23 |
end program omp_parallel |