https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83515
G. Steinmetz <gs...@t-online.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gs...@t-online.de --- Comment #3 from G. Steinmetz <gs...@t-online.de> --- Simplified : $ cat z1.f90 module m type t contains procedure :: g => s end type contains function f(x) result(z) class(*), pointer :: z end subroutine s(x, q) class(t) :: x procedure(f) :: q call x%g(q=q) end end $ gfortran-9-20180610 -c z1.f90 f951: internal compiler error: Invalid expression in gfc_element_size. 0x65bfef gfc_internal_error(char const*, ...) ../../gcc/fortran/error.c:1362 0x6f150b gfc_element_size(gfc_expr*) ../../gcc/fortran/target-memory.c:126 0x640228 find_intrinsic_vtab ../../gcc/fortran/class.c:2702 0x640228 gfc_find_vtab(gfc_typespec*) ../../gcc/fortran/class.c:2845 0x66a6d8 compare_actual_formal ../../gcc/fortran/interface.c:2946 0x66c5ae gfc_procedure_use(gfc_symbol*, gfc_actual_arglist**, locus*) ../../gcc/fortran/interface.c:3738 0x6cd415 resolve_specific_s0 ../../gcc/fortran/resolve.c:3457 0x6cd415 resolve_specific_s ../../gcc/fortran/resolve.c:3477 0x6cd415 resolve_call ../../gcc/fortran/resolve.c:3631 0x6cd9c3 resolve_typebound_call ../../gcc/fortran/resolve.c:6232 0x6cba4d resolve_typebound_subroutine ../../gcc/fortran/resolve.c:6522 0x6cba4d gfc_resolve_code(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:11328 0x6cc95a resolve_codes ../../gcc/fortran/resolve.c:16564 0x6cc857 resolve_codes ../../gcc/fortran/resolve.c:16548 0x6cca5e gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:16599 0x6b6464 gfc_parse_file() ../../gcc/fortran/parse.c:6262 0x6fd22f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:204