https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86484
janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |janus at gcc dot gnu.org --- Comment #4 from janus at gcc dot gnu.org --- The following draft patch fixes both this one and PR 84543: diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 85247dd8334..98a00ef77bb 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -1366,6 +1366,10 @@ gfc_match_assignment (void) gfc_check_do_variable (lvalue->symtree); + if (lvalue->ts.type == BT_CLASS) + gfc_find_vtab (&rvalue->ts); + + return MATCH_YES; }