File1: #include <stdio.h>\n#include <omp.h>\n\nvoid foo(){\n\n  int x = 0, y = 2;\n\n  #pragma omp task depend(inout: x) shared(x)\n  x++;                                                //1st Child Task\n\n  #pragma omp task shared(y)\n  y--;                                                // 2nd child task\n\n  #pragma omp taskwait depend(in: x)                  // 1st taskwait\n\n  printf("x=%d\n",x);\n  printf("y=%d\n",y);\n  #pragma omp taskwait                                // 2nd taskwait\n}\n\n\nint main(){\n  #pragma omp parallel\n  #pragma omp single\n  foo();\n\n  return 0;\n}\n
File2: program DRB165_taskdep4_orig_yes_omp_50\n    use omp_lib\n    implicit none\n\n    !$omp parallel\n    !$omp single\n    call foo()\n    !$omp end single\n    !$omp end parallel\ncontains\n    subroutine foo()\n        implicit none\n        integer :: x, y\n        x = 0\n        y = 2\n\n        !$omp task depend(inout: x) shared(x)\n        x = x+1                                 !!1st Child Task\n        !$omp end task\n\n        !$omp task shared(y)\n        y = y-1                                 !!2nd child task\n        !$omp end task\n\n        !$omp taskwait depend(in: x)            !!1st taskwait\n\n        print*, "x=", x\n        print*, "y=", y\n\n        !$omp taskwait                          !!2nd taskwait\n    end subroutine foo\nend program