brintos

brintos / llvm-project-archived public Read only

0
0
Text · 697 B · 6e36db1 Raw
26 lines · plain
1!RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s2 3! This should compile without errors. Check for a symptom of a reasonable4! output.5 6!CHECK: omp.task depend7 8subroutine omp_task_depend_reproducer(work, myid, shift)9  implicit none10  integer, intent(in) :: myid, shift11  real, intent(inout) :: work(*)12 13!$omp parallel shared(work, myid, shift)14  !$omp single15    !$omp task depend(in:work(myid+shift-1)) depend(in:work(myid-1)) depend(out:work(myid))16      call dummy_kernel(work(myid))17    !$omp end task18  !$omp end single19!$omp end parallel20contains21  subroutine dummy_kernel(x)22    real :: x23    x = x + 1.024  end subroutine dummy_kernel25end subroutine omp_task_depend_reproducer26