This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

[gfortran-5.4.0] internal error at fortran/trans-types.c:1086


Hi there,
got some issue with this buggy program

----------

program len
  implicit none
  integer, parameter :: mylen = 3
  character(len=mylen) :: string

contains

  subroutine myroutine()
    implicit none
    character(len=myotherlen) :: otherstring

  end subroutine myroutine

end program len


------------

It yields an internal compiler error:

len.f90:8:0:

   subroutine myroutine()
 1
internal compiler error: in gfc_typenode_for_spec, at
fortran/trans-types.c:1086
Please submit a full bug report,
with preprocessed source if appropriate.


The code is buggy because "myotherlen" is obviously undefined. But, in
the main part, no defining "mylen" produces a compiler message:

Error: 'string' at (1) must have constant character length in this context

and I would have expected the same from within the subroutine,
especially with the "implicit none" instructions.

Let me know if I need to open a bug report for this!

Best,
Chris.


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