https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103174
Bug ID: 103174 Summary: ICE in gfc_match_varspec, at fortran/primary.c:2154 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Started with r6 (valid, in contrast to pr95710) : (line f = 'abc' is not neccessary to create an ICE) $ cat z1.f90 module m interface module function f(x) integer, intent(in) :: x class(*), allocatable :: f end end interface end submodule(m) m2 contains module function f(x) integer, intent(in) :: x class(*), allocatable :: f f = 'abc' end end $ gfortran-12-20211107 -c z1.f90 f951: internal compiler error: Segmentation fault 0xd4f7bf crash_signal ../../gcc/toplev.c:322 0x7fc775 gfc_match_varspec(gfc_expr*, int, bool, bool) ../../gcc/fortran/primary.c:2154 0x7fd502 match_variable ../../gcc/fortran/primary.c:4141 0x7c6726 gfc_match(char const*, ...) ../../gcc/fortran/match.c:1137 0x7c7fed gfc_match_assignment() ../../gcc/fortran/match.c:1315 0x7f1210 match_word ../../gcc/fortran/parse.c:67 0x7f1210 decode_statement ../../gcc/fortran/parse.c:363 0x7f2d0a next_free ../../gcc/fortran/parse.c:1388 0x7f2d0a next_statement ../../gcc/fortran/parse.c:1620 0x7f442b parse_spec ../../gcc/fortran/parse.c:4159 0x7f779c parse_progunit ../../gcc/fortran/parse.c:6170 0x7f7b81 parse_contained ../../gcc/fortran/parse.c:6071 0x7f8597 parse_module ../../gcc/fortran/parse.c:6444 0x7f88c7 gfc_parse_file() ../../gcc/fortran/parse.c:6751 0x845d3f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:216