https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66227
--- Comment #5 from janus at gcc dot gnu.org --- (In reply to janus from comment #4) > The following patch fixes it: ... but unfortunately causes a failure of extends_type_of_3.f90 in the testsuite, which means either: * one of the tests in extends_type_of_3.f90 is wrong or * we're missing an optimization opportunity with my patch. I'm currently not sure which one it is, but I'll investigate.