[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / OpenMP / omp-task01.f90
blob4dc80d6d70e0521fc6093633a7d3d327756c05e8
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.
6 recursive subroutine traverse ( P )
7 type Node
8 type(Node), pointer :: left, right
9 end type Node
11 type(Node) :: P
13 !CHECK: invalid branch into an OpenMP structured block
14 goto 10
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
24 if (associated(P%right)) then
25 !$omp task
26 call traverse(P%right)
27 !$omp end task
28 endif
29 call process ( P )
31 end subroutine traverse