d: Add language reference section to documentation files.
[official-gcc.git] / libgomp / testsuite / libgomp.fortran / task-detach-4.f90
blob159624cc74b136433dad32f8c90773bfdf20e71c
1 ! { dg-do run }
3 ! Test detach clause, where a task fulfills its own completion event.
5 program task_detach_4
7 use omp_lib
9 integer (kind=omp_event_handle_kind) :: detach_event
10 integer :: x = 0
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
21 if (x /= 1) stop 1
22 end program