https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104572
Bug ID: 104572 Summary: ICE in gfc_resolve_finalizers, at fortran/resolve.cc:13646 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: --- Affects versions down to at least r5 : $ cat z1.f90 module m type t contains final :: s end type contains subroutine s(*) end end $ gfortran-12-20220213 -c z1.f90 f951: internal compiler error: Segmentation fault 0xcc8a9f crash_signal ../../gcc/toplev.cc:322 0x75abf3 gfc_resolve_finalizers ../../gcc/fortran/resolve.cc:13646 0x7726fd resolve_fl_derived ../../gcc/fortran/resolve.cc:15112 0x76c1f7 resolve_symbol ../../gcc/fortran/resolve.cc:15504 0x78b442 do_traverse_symtree ../../gcc/fortran/symbol.cc:4174 0x76f7a4 resolve_types ../../gcc/fortran/resolve.cc:17454 0x76ac3c gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.cc:17569 0x752d72 gfc_parse_file() ../../gcc/fortran/parse.cc:6792 0x7a066f gfc_be_parse_file ../../gcc/fortran/f95-lang.cc:216