blob: bdf93a5909a99f1ef89ec9bee445246f91423a34 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
! { dg-do run }
! Test the task detach clause used together with dependencies.
program task_detach_3
use omp_lib
integer (kind=omp_event_handle_kind) :: detach_event
integer :: x = 0, y = 0, z = 0
integer :: dep
!$omp parallel
!$omp single
!$omp task depend(out:dep) detach(detach_event)
x = x + 1
!$omp end task
!$omp task
y = y + 1
call omp_fulfill_event(detach_event)
!$omp end task
!$omp task depend(in:dep)
z = z + 1
!$omp end task
!$omp end single
!$omp end parallel
if (x /= 1) stop 1
if (y /= 1) stop 2
if (z /= 1) stop 3
end program
|