cpp: #include <omp.h>\n#include <stdio.h>\n#include <unistd.h>\n\nint main(int argc, char* argv[])\n{\n  int var = 0;\n  int i;\n\n  #pragma omp parallel sections \n  {\n    for (i = 0; i < 10; i++) {\n      #pragma omp task shared(var) if(0)\n      {\n        var++;\n      }\n    }\n  }\n\n  printf("%d\n",var);\n  return 0;\n}\n
fortran: program DRB122_taskundeferred_orig_no\n    use omp_lib\n    implicit none\n\n    integer :: var, i\n    var = 0\n\n    !$omp parallel sections\n    do i = 1, 10\n        !$omp task shared(var) if(.FALSE.)\n        var = var+1;\n        !$omp end task\n    end do\n    !$omp end parallel sections\n\n    print 100, var\n    100 format ('var =', 3i8)\nend program