https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61420
--- Comment #3 from janus at gcc dot gnu.org --- There is a piece of code in resolve_variable (resolve.c, line 4911) that looks like it is related to this problem: if (sym->attr.flavor == FL_PROCEDURE && (!sym->attr.function || (sym->attr.function && sym->result && sym->result->attr.proc_pointer && !sym->result->attr.function))) { e->ts.type = BT_PROCEDURE; goto resolve_procedure; } The error which is thrown here comes from gfc_set_default_type, which is being called from resolve_variable.