I got this weird behavior of PGI Fortran 9.0-4.
REAL, DIMENSION(:, :), ALLOCATABLE : A
end program main
REAL, DIMENSION(:, :) :: A
INTEGER :: x
x = size(A,1)
print *, x
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.