Debian Codegraph @

gcc/testsuite/gfortran.dg/gomp/dispatch-9a.f90

raw
1 ! { dg-do compile }
2 ! { dg-additional-options "-fdump-tree-gimple" }
3
4 module m
5 contains
6 subroutine f1 (ar)
7 integer :: arr(10)
8 end
9 subroutine f0 (ar)
10 integer :: arr(10)
11 !$omp declare variant (f1) match (construct={dispatch})
12 end
13 end module
14
15 subroutine call_it(x, arr)
16 logical :: x
17 integer :: arr(:)
18 !$omp dispatch depend(inout:x) nowait
19 call f0(arr)
20 !$omp end dispatch ! valid since 5.2
21 !$omp dispatch depend(inout:x)
22 call f0(arr)
23 !$omp end dispatch nowait ! likewise valid (unless there is a 'nowait' at '!$omp dispatch')
24 end
25
26 ! { dg-final { scan-tree-dump-times "#pragma omp taskwait depend\\(inout:x\\) nowait" 2 "gimple" } }
27 ! { dg-final { scan-tree-dump-times "#pragma omp dispatch nowait" 2 "gimple" } }