Debian Codegraph @

libgomp/testsuite/libgomp.fortran/task-in-explicit-3.f90

raw
1 ! { dg-do run }
2
3 module m
4 integer :: a
5 end module m
6
7 program main
8 use omp_lib
9 use m
10 implicit none
11 !$omp task
12 if (.not. omp_in_explicit_task ()) &
13 error stop
14 !$omp task
15 if (.not. omp_in_explicit_task ()) &
16 error stop
17 !$omp taskgroup task_reduction (+: a)
18 if (.not. omp_in_explicit_task ()) &
19 error stop
20 !$omp task in_reduction (+: a)
21 a = a + 1
22 if (.not. omp_in_explicit_task ()) &
23 error stop
24 !$omp end task
25 !$omp end taskgroup
26 if (.not. omp_in_explicit_task ()) &
27 error stop
28 !$omp taskwait
29 !$omp end task
30 !$omp end task
31 end