[PATCH] PR47040 - Make error message for empty array constructor more helpful/correct
Dominique d'Humières
dominiq@lps.ens.fr
Sat Apr 9 15:58:00 GMT 2016
> (/ /) is valid Fortran 95 syntax
> ...
>
> program foo
> call bar((/ /))
> end program foo
>
> % gfc -c -std=f95 foo.f90
> foo.f90:2:17:
>
> call bar((/ /))
> 1
> Error: Empty array constructor at (1) is not allowed
>
> The above error is correct.
Well the two assertions look contradictory: if (/ /) is valid Fortran 95 syntax
why is it not allowed?
> Adding any text referring
> to type-spec is wrong.
>
> --
> Steve
Are you considering (/ ( i, i = 1, 0 ) /) as non empty?
Dominique
More information about the Fortran
mailing list