https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86116
--- Comment #2 from janus at gcc dot gnu.org --- The problem can be fixed by removing the following piece of code: Index: gcc/fortran/interface.c =================================================================== --- gcc/fortran/interface.c (revision 263308) +++ gcc/fortran/interface.c (working copy) @@ -735,12 +735,6 @@ compare_type (gfc_symbol *s1, gfc_symbol *s2) if (s2->attr.ext_attr & (1 << EXT_ATTR_NO_ARG_CHECK)) return true; - /* TYPE and CLASS of the same declared type are type compatible, - but have different characteristics. */ - if ((s1->ts.type == BT_CLASS && s2->ts.type == BT_DERIVED) - || (s1->ts.type == BT_DERIVED && s2->ts.type == BT_CLASS)) - return false; - return gfc_compare_types (&s1->ts, &s2->ts) || s2->ts.type == BT_ASSUMED; } This was added by Tobias in r201329 (for PR 57530), which is certainly the origin of the regression. Unfortunately the commit does not include a test case, nevertheless I expect that the patch above will trigger some testsuite regressions (but haven't checked yet).