Error: Parameter array ... cannot be automatic or assumed shape
Daniel Franke
franke.daniel@gmail.com
Thu Jul 26 16:58:00 GMT 2007
On Thursday 26 July 2007 18:41:06 Florian Ladstaedter wrote:
> Hi, I am trying to get a software project compiling with gfortran, this
> is the first error I am running in (example code):
[code and messages snipped]
> $ gfortran-4.2 --version
> GNU Fortran (GCC) 4.2.1 (Debian 4.2.1-0)
> This is somehow similar to PR26074 (which is fixed and works). NAG and
> Lahey Fortran compiler work with this code. Is this a gfortran bug or do
> you have any suggestion (apart from using simply a number in the
> dimension specification)?
Florian,
PR26974 has:
integer, parameter :: len = 1
integer :: arr(max(len,1)) = (/1/)
while your testcase contains:
integer, parameter :: l = 1
integer, parameter :: arr(max(l,1)) = (/1/)
where the only difference is the additional PARAMETER declaration for ARR. I
can reproduce the problem with gfortran-{4.1.2|4.2|4.3}. Intel and Sun
compilers remain silent. So, I'd think, this is a bug.
If nobody else objects, please open a new PR.
Thanks :)
Daniel
More information about the Fortran
mailing list