[Bug fortran/83078] ICE in gfc_typenode_for_spec, at fortran/trans-types.c:1110

gscfq@t-online.de gcc-bugzilla@gcc.gnu.org
Mon Nov 20 17:22:00 GMT 2017


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

--- Comment #1 from G. Steinmetz <gscfq@t-online.de> ---

Detected without "implicit none" :


$ cat z2.f90
program p
   type t
      integer :: a(n)
   end type t
   type(t) :: x = t([1, 2])
end


$ gfortran-8-20171119 -c z2.f90
z2.f90:3:19:

       integer :: a(n)
                   1
Error: Variable 'n' at (1) in this context must be constant
z2.f90:3:19:

       integer :: a(n)
                   1
Error: Variable 'n' at (1) in this context must be constant


More information about the Gcc-bugs mailing list