Retro68/gcc/libgomp/testsuite/libgomp.fortran/examples-4/task_dep-3.f90

19 lines
369 B
Fortran
Raw Normal View History

2017-04-10 11:32:00 +00:00
! { dg-do run }
program example
integer :: x
x = 0
!$omp parallel
!$omp single
!$omp task shared(x) depend(out: x)
x = 1
!$omp end task
!$omp task shared(x) depend(out: x)
x = 2
!$omp end task
!$omp taskwait
2018-12-28 15:30:48 +00:00
if ((x .ne. 1) .and. (x .ne. 2)) STOP 1
2017-04-10 11:32:00 +00:00
!$omp end single
!$omp end parallel
end program