This one was challenging to even describe. This ICE occurs with gfortran 12, 13, 14, and 15.
% cat all.f90 module subdomain_m implicit none type subdomain_t real :: s_ = 0. contains generic :: operator(.laplacian.) => laplacian procedure laplacian end type contains function laplacian(rhs) class(subdomain_t), intent(in) :: rhs type(subdomain_t) laplacian end function end module use subdomain_m implicit none type operands_t end type type(subdomain_t) phi type(operands_t) operands associate(laplacian_phi => .laplacian. phi) operands = approximates(laplacian_phi%s_) end associate contains function approximates(actual) real actual type(operands_t) approximates end function end % gfortran all.f90 f951: internal compiler error: in matching_typebound_op, at fortran/interface.cc:4763 Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://github.com/Homebrew/homebrew-core/issues> for instructions. % gfortran --version GNU Fortran (Homebrew GCC 15.1.0) 15.1.0