+2008-03-19 Daniel Franke <franke.daniel@gmail.com>
+
+ PR fortran/35152
+ * interface.c (gfc_procedure_use): Check for keyworded arguments in
+ procedures without explicit interfaces.
+
2008-03-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/35470
}
}
- if (sym->attr.if_source == IFSRC_UNKNOWN
- || !compare_actual_formal (ap, sym->formal, 0,
- sym->attr.elemental, where))
+ if (sym->attr.external
+ || sym->attr.if_source == IFSRC_UNKNOWN)
+ {
+ gfc_actual_arglist *a;
+ for (a = *ap; a; a = a->next)
+ {
+ /* Skip g77 keyword extensions like %VAL, %REF, %LOC. */
+ if (a->name != NULL && a->name[0] != '%')
+ {
+ gfc_error("Keyword argument requires explicit interface "
+ "for procedure '%s' at %L", sym->name, &a->expr->where);
+ break;
+ }
+ }
+
+ return;
+ }
+
+ if (!compare_actual_formal (ap, sym->formal, 0,
+ sym->attr.elemental, where))
return;
check_intents (sym->formal, *ap);
+2008-03-19 Daniel Franke <franke.daniel@gmail.com>
+
+ PR fortran/35152
+ * gfortran.dg/argument_checking_16.f90: New test.
+
2008-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/32972
--- /dev/null
+! { dg-do compile }
+! PR fortran/35152 - implicit procedure with keyword=argument
+
+external bar
+
+call bar(a=5) ! { dg-error "requires explicit interface" }
+call foo(a=5) ! { dg-error "requires explicit interface" }
+end
+