cpp: #include <stdio.h>\nint main(int argc, char* argv[])\n{   \n  int i;\n  int len = 1000;\n\n  int a[1000];\n\n  for (i=0; i<len; i++)\n    a[i]= i; \n\n#pragma omp parallel for\n  for (i=0;i< len -1 ;i++)\n    a[i]=a[i+1]+1;\n\n  printf ("a[500]=%d\n", a[500] );\n  return 0;\n} \n
fortran: program DRB001_antidep1_orig_yes\nuse omp_lib\n    implicit none\n    integer :: i, len\n    integer :: a(1000)\n\n    len = 1000\n\n    do i = 1, len\n        a(i) = i\n    end do\n\n    !$omp parallel do\n    do i = 1, len-1\n        a(i) = a(i+1) + 1\n    end do\n    !$omp end parallel do\n\n    print 100, a(500)\n    100 format ('a(500)=',i3)\nend program