http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47463
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org, | |janus at gcc dot gnu.org Summary|ICE in |[OOP] ICE in |gfc_add_component_ref |gfc_add_component_ref --- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-25 19:53:04 UTC --- 4.5 fails with: use hydro_recon 1 Internal Error at (1): mio_component_ref(): Component not found Thus, it is not a regression. * * * Compiling with Crayftn 7.2.4 shows the error: call this%init(st, gr) ^ ftn-389 crayftn: ERROR INIT_PARAMS, File = hydro_flow.f90, Line = 55, Column = 14 No specific match can be found for the generic subprogram call "INIT". * * * Regarding GCC 4.6: The ICE occurs in gfc_add_component_ref for e being the EXPR_FUNCTION "this->_vptr" where "_vptr" is e->ref->u.c.component->name and e->ref->next == NULL. Also e->value.function == {actual = 0x0, name = 0x0, isym = 0x0, esym = 0x0}. The caller is resolve_typebound_subroutine where code->op == EXEC_ASSIGN_CALL; the call is: gfc_add_component_ref (code->expr1, name); with "name" == assign and the expression as shown above. Somewhat reduced test case: module hydro_state type :: state_t contains procedure :: assign generic :: assignment(=) => assign end type state_t contains subroutine assign (this, that) class(state_t), intent(inout) :: this class(state_t), intent(in) :: that end subroutine assign end module hydro_state module hydro_flow use hydro_state type :: flow_t class(state_t), allocatable :: st end type flow_t contains subroutine init_comps (this, st) class(flow_t), intent(out) :: this class(state_t), intent(in) :: st allocate(state_t :: this%st) this%st = st end subroutine init_comps end module hydro_flow