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

17 lines
323 B
Fortran
Raw Normal View History

2017-04-10 11:32:00 +00:00
! { dg-do run }
program example
integer :: x
x = 1
!$omp parallel
!$omp single
!$omp task shared(x) depend(in: x)
if (x .ne. 1) call abort ()
!$omp end task
!$omp task shared(x) depend(out: x)
x = 2
!$omp end task
!$omp end single
!$omp end parallel
end program