This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/58498] Bogus "Invalid kind for INTEGER"
- From: "fxcoudert at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 07 Jun 2014 08:46:30 +0000
- Subject: [Bug fortran/58498] Bogus "Invalid kind for INTEGER"
- Auto-submitted: auto-generated
- References: <bug-58498-4 at http dot gcc dot gnu dot org/bugzilla/>
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.