Debian Codegraph @

libgomp/testsuite/libgomp.fortran/task-detach-4.f90

raw
1 ! { dg-do run }
2
3 ! Test detach clause, where a task fulfills its own completion event.
4
5 program task_detach_4
6
7 use omp_lib
8
9 integer (kind=omp_event_handle_kind) :: detach_event
10 integer :: x = 0
11
12 !$omp parallel
13 !$omp single
14 !$omp task detach (detach_event)
15 x = x + 1
16 call omp_fulfill_event (detach_event)
17 !$omp end task
18 !$omp end single
19 !$omp end parallel
20
21 if (x /= 1) stop 1
22 end program