File1: #include <stdio.h>\n\nvoid foo()\n{\n  int i,x;\n#pragma omp parallel for private (i) lastprivate (x)\n  for (i=0;i<100;i++)\n    x=i;\n  printf("x=%d",x);\n}\n\nint main()\n{\n  foo();\n  return 0;\n}\n\n
File2: program DRB059_lastprivate_orig_no\n    use omp_lib\n    implicit none\n    !$omp parallel\n    call foo()\n    !$omp end parallel\ncontains\n    subroutine foo()\n        integer :: i, x\n        !$omp parallel do private(i) lastprivate(x)\n        do i = 1, 100\n            x = i\n        end do\n        !$omp end parallel do\n        print 100, x\n        100 format ("x =",i3)\n    end subroutine foo\nend program