| 1 |
! RUN: not %flang -fsyntax-only -fopenmp %s 2>&1 | FileCheck %s |
| 2 |
! OpenMP Version 4.5 |
| 3 |
! 2.9.1 task Construct |
| 4 |
! Invalid entry to OpenMP structured block. |
| 5 |
|
| 6 |
recursive subroutine traverse ( P ) |
| 7 |
type Node |
| 8 |
type(Node), pointer :: left, right |
| 9 |
end type Node |
| 10 |
|
| 11 |
type(Node) :: P |
| 12 |
|
| 13 |
!CHECK: invalid branch into an OpenMP structured block |
| 14 |
goto 10 |
| 15 |
|
| 16 |
if (associated(P%left)) then |
| 17 |
!$omp task |
| 18 |
call traverse(P%left) |
| 19 |
!CHECK: In the enclosing TASK directive branched into |
| 20 |
10 stop |
| 21 |
!$omp end task |
| 22 |
endif |
| 23 |
|
| 24 |
if (associated(P%right)) then |
| 25 |
!$omp task |
| 26 |
call traverse(P%right) |
| 27 |
!$omp end task |
| 28 |
endif |
| 29 |
call process ( P ) |
| 30 |
|
| 31 |
end subroutine traverse |