From 8b7a967ed4c20e00fc966e3d30a09fed74216dc7 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Mon, 6 Oct 2014 07:57:57 +0200 Subject: libgfortran.h (GFC_STD_F2015): Add. 2014-10-06 Tobias Burnus gcc/fortran/ * libgfortran.h (GFC_STD_F2015): Add. * decl.c (gfc_match_implicit_none): Handle spec list. (gfc_match_implicit): Move double intrinsic warning here. * gfortran.h (gfc_namespace): Add has_implicit_none_export:1. (gfc_set_implicit_none): Update interface. * interface.c (gfc_procedure_use): Add implicit-none external error check. * parse.c (accept_statement): Remove call. (verify_st_order): Permit that external-implict-none follows implicit statement. * symbol.c (gfc_set_implicit_none): Handle external/type implicit none. gcc/testsuite/ * gfortran.dg/implicit_14.f90: New. * gfortran.dg/implicit_15.f90: New. * gfortran.dg/implicit_4.f90: Update dg-error. From-SVN: r215914 --- gcc/fortran/interface.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc/fortran/interface.c') diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index f6233b7..1eb09ac 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -3252,8 +3252,14 @@ gfc_procedure_use (gfc_symbol *sym, gfc_actual_arglist **ap, locus *where) for calling a ISO_C_BINDING because c_loc and c_funloc are pseudo-unknown. Additionally, warn about procedures not explicitly declared at all if requested. */ - if (sym->attr.if_source == IFSRC_UNKNOWN && ! sym->attr.is_iso_c) + if (sym->attr.if_source == IFSRC_UNKNOWN && !sym->attr.is_iso_c) { + if (sym->ns->has_implicit_none_export && sym->attr.proc == PROC_UNKNOWN) + { + gfc_error ("Procedure '%s' called at %L is not explicitly declared", + sym->name, where); + return false; + } if (gfc_option.warn_implicit_interface) gfc_warning ("Procedure '%s' called with an implicit interface at %L", sym->name, where); -- cgit v1.1