Hi,
I got this weird behavior of PGI Fortran 9.0-4.
program main
REAL, DIMENSION(:, :), ALLOCATABLE : A
allocate(A(10,10))
call func(A)
end program main
subroutine func(A)
REAL, DIMENSION(:, :) :: A
INTEGER :: x
x = size(A,1)
print *, x
end subroutine
If I compile the program without -mc=model or -Mlarge_arrays, the extent of the matrix A is retrieved correctly, as I print x out. However, when I use either of these two options, I only get zeros for any extents of the array A. Could any suggest me how to resolve this as I want to know the array extent without passing it via dummy arguments. I tested with intrinsic matmul, there is no problem with this function.