blob: 6e36db178dc8ed0a02be1ecdf008a2d550b1c122 [file] [log] [blame] [edit]
!RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s
! This should compile without errors. Check for a symptom of a reasonable
! output.
!CHECK: omp.task depend
subroutine omp_task_depend_reproducer(work, myid, shift)
implicit none
integer, intent(in) :: myid, shift
real, intent(inout) :: work(*)
!$omp parallel shared(work, myid, shift)
!$omp single
!$omp task depend(in:work(myid+shift-1)) depend(in:work(myid-1)) depend(out:work(myid))
call dummy_kernel(work(myid))
!$omp end task
!$omp end single
!$omp end parallel
contains
subroutine dummy_kernel(x)
real :: x
x = x + 1.0
end subroutine dummy_kernel
end subroutine omp_task_depend_reproducer