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

            Bug ID: 88025
           Summary: [7/8/9 Regression] ICE in gfc_apply_init, at
                    fortran/expr.c:4468
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

This invalid code affects versions down to gfortran-5 :


$ cat z1.f90
program p
   type t
      character(('')) :: c = 'c'
   end type
end


$ gfortran-5 -c z1.f90
z1.f90:3:16:

       character(('')) :: c = 'c'
                1
Error: Expression at (1) must be of INTEGER type, found CHARACTER


$ gfortran-9-20181111 -c z1.f90
f951: internal compiler error: in gfc_apply_init, at fortran/expr.c:4468
0x61befc gfc_apply_init(gfc_typespec*, symbol_attribute*, gfc_expr*)
        ../../gcc/fortran/expr.c:4468
0x60e003 build_struct
        ../../gcc/fortran/decl.c:2111
0x60e003 variable_decl
        ../../gcc/fortran/decl.c:2786
0x60e003 gfc_match_data_decl()
        ../../gcc/fortran/decl.c:5921
0x66d0d3 match_word
        ../../gcc/fortran/parse.c:65
0x66d0d3 decode_statement
        ../../gcc/fortran/parse.c:376
0x66eb5a next_free
        ../../gcc/fortran/parse.c:1234
0x66eb5a next_statement
        ../../gcc/fortran/parse.c:1466
0x6705a4 parse_derived
        ../../gcc/fortran/parse.c:3278
0x6705a4 parse_spec
        ../../gcc/fortran/parse.c:3819
0x672c37 parse_progunit
        ../../gcc/fortran/parse.c:5671
0x6742b9 gfc_parse_file()
        ../../gcc/fortran/parse.c:6211
0x6bc89f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:204

Reply via email to