[Bug fortran/58498] Bogus "Invalid kind for INTEGER"
fxcoudert at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jun 7 08:46:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58498
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu.org
--- Comment #4 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Reduced testcase, to summarize:
integer, parameter :: arr(1) = [ 1 ]
integer, parameter :: x(1) = [( range(int(0,arr(i))), i=1,1 )]
integer :: i
print *, x
print *, range(int(0,arr(1)))
end
Intel wrongly refuses to compile it ("A kind type parameter must be a
compile-time constant"), and IBM compiles it but gives a wrong answer (range of
-51378971).
So it's indeed tricky code. Both prints should output the same number.
More information about the Gcc-bugs
mailing list