[Bug fortran/68224] ICE on referencing parameter array with dimension null
gerhard.steinmetz.fortran@t-online.de
gcc-bugzilla@gcc.gnu.org
Thu Nov 5 20:44:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68224
--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Detected when assignment is separated from declaration :
$ cat z6.f90
program p
integer, parameter :: c(null()) = [1, 2]
integer :: a, b
a = c(1)
b = c(2)
end
$ gfortran -g -O0 -Wall -fcheck=all z6.f90
z6.f90:2:27:
integer, parameter :: c(null()) = [1, 2]
1
Error: Expression at (1) must be of INTEGER type, found UNKNOWN
z6.f90:2:34:
integer, parameter :: c(null()) = [1, 2]
1
Error: Parameter array 'c' at (1) cannot be automatic or of deferred shape
More information about the Gcc-bugs
mailing list