cpp: #include <stdio.h>\n#include <assert.h>\n#include <unistd.h>\n\nint main()\n{\n  int result = 0;\n#pragma omp parallel\n  {\n#pragma omp single\n    {\n#pragma omp taskgroup\n      {\n#pragma omp task\n        {\n          sleep(3);\n          result = 1; \n        }\n      }\n#pragma omp task\n      {\n        result = 2; \n      }\n    }\n  }\n  printf ("result=%d\n", result);\n  assert (result==2);\n  return 0;\n}\n
fortran: program DRB107_taskgroup_orig_no\n    use omp_lib\n    implicit none\n\n    integer result\n    result = 0\n\n    !$omp parallel\n    !$omp single\n        !$omp taskgroup\n            !$omp task\n            call sleep(3)\n            result = 1\n            !$omp end task\n        !$omp end taskgroup\n        !$omp task\n        result = 2\n        !$omp end task\n    !$omp end single\n    !$omp end parallel\n\n    print 100, result\n    100 format ('result =',3i8)\n\nend program