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

--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> 
---
To begin with a short example, namely function_kinds_3.f90.

Placing statement "private" explicit in source, reducing a bit,
then compiling without "-fmodule-private" :


$ cat z1.f90
module m
  private
  integer, parameter :: char_t = kind('a')
end module m

character(1,char_t) function test1()
  use m
  test1 = 'A'
end function test1


$ gfortran-6 --version
GNU Fortran (SUSE Linux) 6.0.0 20160121 (experimental) [trunk revision 232670]


$ gfortran-6 -c z1.f90
z1.f90:6:12:

 character(1,char_t) function test1()
            1

Error: Parameter ‘char_t’ at (1) has not been declared or is a variable, which
does not reduce to a constant expression
f951: internal compiler error: in gfc_convert_chartype, at
fortran/intrinsic.c:4812


$ gfortran-5.3.1 -c z1.f90
(null):0: confused by earlier errors, bailing out


$ gfortran-4.9.0 -c z1.f90
f951: internal compiler error: in gfc_convert_chartype, at
fortran/intrinsic.c:4623

Reply via email to