cpp: #include <stdlib.h>\n#include <stdio.h>\nint main(int argc, char* argv[])\n{\n  int i,j;\n  int n=1000, m=1000;\n  double b[1000][1000];\n\n  for (i=0; i<n; i++)\n    for (j=0; j<m; j++)\n      b[i][j] = 0.5; \n\n#pragma omp parallel for private(j)\n  for (i=1;i<n;i++)\n    for (j=1;j<m;j++)\n      b[i][j]=b[i-1][j-1];\n\n  printf("b[500][500]=%f\n", b[500][500]);  \n  return 0;\n}\n
fortran: program DRB031_truedepfirstdimension_orig_yes\n    use omp_lib\n    implicit none\n\n    integer :: i, j, n, m\n    real, dimension(:,:), allocatable :: b\n\n    n = 1000\n    m = 1000\n    allocate (b(n,m))\n\n    do i = 1, n\n        do j = 1, m\n            b(i,j) = 0.5\n        end do\n    end do\n\n    !$omp parallel do private(j)\n    do i = 2, n\n        do j = 2, m\n            b(i,j) = b(i-1, j-1)\n        end do\n    end do\n    !$omp end parallel do\n\n    print 100, b(500,500)\n    100 format ('b(500,500) =',F10.6)\n\n    deallocate(b)\nend program