https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85779
Bug ID: 85779 Summary: ICE in gfc_typename, at fortran/misc.c:156 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: --- With invalid code, down to at least 4.8 : $ cat z1.f90 type(t) function f() type f end type end $ cat z2.f90 type(t) function f() result(z) type z end type end $ gfortran-9-20180513 -c z1.f90 f951: internal compiler error: Segmentation fault 0xb9f4bf crash_signal ../../gcc/toplev.c:325 0x6de45c gfc_typename(gfc_typespec*) ../../gcc/fortran/misc.c:156 0x69d9b6 gfc_match_derived_decl() ../../gcc/fortran/decl.c:9964 0x6f7139 match_word_omp_simd ../../gcc/fortran/parse.c:93 0x6fc0b1 match_word ../../gcc/fortran/parse.c:265 0x6fc0b1 decode_specification_statement ../../gcc/fortran/parse.c:265 0x6fc0b1 decode_statement ../../gcc/fortran/parse.c:314 0x6fc754 next_free ../../gcc/fortran/parse.c:1230 0x6fc754 next_statement ../../gcc/fortran/parse.c:1462 0x6fe56c parse_spec ../../gcc/fortran/parse.c:3670 0x700533 parse_progunit ../../gcc/fortran/parse.c:5667 0x701ec1 gfc_parse_file() ../../gcc/fortran/parse.c:6221 0x748adf gfc_be_parse_file ../../gcc/fortran/f95-lang.c:204