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