pgf90 finds an error in the following code:
module test2
implicit none
integer, dimension(3), parameter :: m = (/ 2, 5, 3 /)
real, dimension(3*m(2)), save :: b ! error
end module test2
program test2p
use test2
implicit none
b = 9.8
print *, b
end program test2p
The error message is:
PGF90-S-0050-Assumed size array, b, is not a dummy argument (test2.f90: 6)
However, I believe b is an explicit-shape array (isn’t 3*m(2) a constant expression?), so that the code is legal. Am I wrong, or is this a compiler bug?
I’m using pgf90 6.2-3 64-bit target on x86-64 Linux.