https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121627

--- Comment #2 from kargls at comcast dot net ---
(In reply to kargls from comment #1)
> This leads to the same ICE without the overhead of a Fortran IO statement.
> 
> program real_kinds
>   use iso_fortran_env
>   i = real64
> end program real_kinds

Well, the coffee kicked in.  The program name 'real_kinds' is
a global identifier, which just so happens to be the name
of a named constant in iso_fortran_env.  Changing the code
to 

program real_kinds
  use iso_fortran_env, only : real64
  i = real64
end program real_kinds

allows it to compile, or changing it to 

program real_kinds
  use iso_fortran_env, only : reals => real_kinds
  i = real64
end program real_kinds

Reply via email to