What does "array cannot have a deferred shape" mean in fortran?
That is exactly what the error is telling you: kron
must have an explicit shape. If you do not want to pass the array sizes beforehand, you'd have to define kron
as
real, dimension(lbound(a,dim=1):ubound(a,dim=1),&
lbound(a,dim=2):ubound(a,dim=2)) :: kron
Using this particular explicit declaration above does compile for me on gfortran 4.6.3.