This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/58498] Bogus "Invalid kind for INTEGER"


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]