http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52295
Bug #: 52295 Summary: Allow internal procedure in generic interfaces Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Keywords: diagnostic, patch, rejects-valid Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: bur...@gcc.gnu.org Found at http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/408949dd41f76a86 gfortran rejects internal procedures in generic interfaces with -std=2008, but that's valid since F2008. Fortran 2003: C1207 (R1206) A procedure-name shall have an explicit interface and shall refer to an accessible procedure pointer, external procedure, dummy procedure, or module procedure. Fortran 2008: C1207 (R1206) A procedure-name shall be a nonintrinsic procedure that has an explicit interface. Untested patch: --- interface.c (revision 184331) +++ interface.c (working copy) @@ -1292,9 +1292,10 @@ return 1; } + /* F2003, C1207. F2008, C1207. */ if (p->sym->attr.proc == PROC_INTERNAL - && gfc_notify_std (GFC_STD_GNU, "Extension: Internal procedure '%s' " - "in %s at %L", p->sym->name, interface_name, + && gfc_notify_std (GFC_STD_F2008, "Fortran 2008: Internal procedure " + "'%s' in %s at %L", p->sym->name, interface_name, &p->sym->declared_at) == FAILURE) return 1; }