http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61115
Bug ID: 61115 Summary: ICE with type bound proc => non_overridable type bound proc Product: gcc Version: 4.10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: mrestelli at gmail dot com The attached (valid, I think) code produces an internal compiler error. The NON_OVERRIDABLE attribute is required to produce the error. $ gfortran -c m.f90 f951: interner Compiler-Fehler: in gfc_add_component_ref, bei fortran/class.c:236 0x55f02f gfc_add_component_ref(gfc_expr*, char const*) gcc/fortran/class.c:236 0x5ca297 resolve_typebound_subroutine gcc/fortran/resolve.c:5943 0x5ca297 resolve_code gcc/fortran/resolve.c:9933 0x5cc92e resolve_codes gcc/fortran/resolve.c:14642 0x5cc837 resolve_codes gcc/fortran/resolve.c:14628 0x5cca12 gfc_resolve gcc/fortran/resolve.c:14670 0x5b82f2 gfc_parse_file() gcc/fortran/parse.c:4665 0x5f5455 gfc_be_parse_file gcc/fortran/f95-lang.c:188 gfortran --version GNU Fortran (GCC) 4.10.0 20140508 (experimental) module m implicit none private type, abstract :: tt contains generic :: gen_f => ff ! Notice: eliminating the non_overridable everything works procedure, pass(this), non_overridable :: ff end type tt contains subroutine ff(this) class(tt) :: this ! do nothing end subroutine ff subroutine some_procedure(this) class(tt), intent(inout) :: this call this%gen_f() ! does not work !call this%ff() ! works end subroutine some_procedure end module m