cpp: #include <assert.h> \nint main()\n{\n  int i=0;\n#pragma omp parallel\n#pragma omp single\n  {\n#pragma omp task depend (out:i)\n    i = 1;    \n#pragma omp task depend (in:i)\n    i = 2;    \n  }\n\n  assert (i==2);\n  return 0;\n} \n
fortran: program DRB072_taskdep1_orig_no\n    use omp_lib\n    implicit none\n\n    integer :: i\n    i = 0\n\n    !$omp parallel\n        !$omp single\n            !$omp task depend (out:i)\n            i = 1\n            !$omp end task\n            !$omp task depend (in:i)\n            i = 2\n            !$omp end task\n        !$omp end single\n    !$omp end parallel\n\n    if (i/=2) then\n        print*,'i is not equal to 2'\n    end if\nend program