cpp: #include <stdlib.h>\nint main(int argc, char* argv[])\n{\n  int i,j;\n  int len = 1000;\n  if (argc>1)\n    len = atoi(argv[1]);\n\n  int n=len, m=len;\n  double b[len][len];\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  return 0;\n}\n
fortran: program DRB032_truedepfirstdimension_var_yes\n    use omp_lib\n    implicit none\n\n    integer :: i, j, n, m, len, argCount, allocStatus, rdErr, ix\n    character(len=80), dimension(:), allocatable :: args\n    real, dimension(:,:), allocatable :: b\n\n    len = 1000\n\n    argCount = command_argument_count()\n    if (argCount == 0) then\n        write (*,'(a)') "No command line arguments provided."\n    end if\n\n    allocate(args(argCount), stat=allocStatus)\n    if (allocStatus > 0) then\n        write (*,'(a)') "Allocation error, program terminated."\n        stop\n    end if\n\n    do ix = 1, argCount\n        call get_command_argument(ix,args(ix))\n    end do\n\n    if (argCount >= 1) then\n        read (args(1), '(i10)', iostat=rdErr) len\n        if (rdErr /= 0 ) then\n            write (*,'(a)') "Error, invalid integer value."\n        end if\n    end if\n\n    n = len\n    m = len\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\n    deallocate(args,b)\nend program