https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95710
Bug ID: 95710 Summary: ICE in gfc_type_is_extensible, at fortran/resolve.c:8848 Product: gcc Version: 11.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 r6, with a doubled declaration : $ cat z1.f90 module m type t integer :: a = 1 end type interface module subroutine s end end interface end submodule(m) m2 contains subroutine s ! or module subroutine s class(t), allocatable :: x class(t), allocatable :: x end end $ cat z2.f90 module m type t integer :: a = 1 end type interface module subroutine s end end interface end submodule(m) m2 contains subroutine s ! or module procedure s class(t), pointer :: x class(t), pointer :: x end end $ cat z3.f90 module m type t integer :: a = 1 end type interface module subroutine s end end interface end submodule(m) m2 contains subroutine s class(t), allocatable :: x class(t), pointer :: x end end $ gfortran-11-20200614 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbcdd2f crash_signal ../../gcc/toplev.c:328 0x5e5861 gfc_type_is_extensible(gfc_symbol*) ../../gcc/fortran/resolve.c:8848 0x5e5861 resolve_fl_var_and_proc ../../gcc/fortran/resolve.c:12658 0x6ce441 resolve_fl_variable ../../gcc/fortran/resolve.c:12774 0x6ce441 resolve_symbol ../../gcc/fortran/resolve.c:15835 0x6eb7d2 do_traverse_symtree ../../gcc/fortran/symbol.c:4162 0x6d0a84 resolve_types ../../gcc/fortran/resolve.c:17175 0x6d0b90 resolve_types ../../gcc/fortran/resolve.c:17186 0x6cc19c gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:17290 0x6b40f2 gfc_parse_file() ../../gcc/fortran/parse.c:6447 0x70036f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212