When transitioning from using the g95 compiler to gfortran I get the following error when I try to compile what previously had been a working code
Error: Allocat
The Fortran 2003 (and, I think, the 90,95 and 2008) standard states that the expression inside the parentheses of the dimension()
clause in the declaration of an allocatable array must be a deferred-shape-spec-list
and that a deferred-shape-spec-list
is a list of colons, separated by ,
if there is more than one element in the list. There should be one colon for each dimension in the array.
I suggest you replace statements such as
integer, allocatable, dimension(1:,1:), INTENT(OUT)::inpoel
with statements such as
integer, allocatable, dimension(:,:), INTENT(OUT)::inpoel
When you later allocate this array the lower bound on each dimension will be, by default, 1
. If, on the other hand you wanted to allocate it with non-default bounds you might write
allocate(inpoel(3:12,4:14))
replacing, obviously, those constants with whatever values you wish.
It's not terrifically surprising that code acceptable to one Fortran compiler is not acceptable to another.