diff options
author | Tobias Burnus <burnus@net-b.de> | 2014-10-06 07:57:57 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2014-10-06 07:57:57 +0200 |
commit | 8b7a967ed4c20e00fc966e3d30a09fed74216dc7 (patch) | |
tree | 3fd948e1c22f57c5745797415d9f60822a38992e /gcc/fortran/interface.c | |
parent | 116886341f638b539387bc900bc513ebe5ad6696 (diff) | |
download | gcc-8b7a967ed4c20e00fc966e3d30a09fed74216dc7.zip gcc-8b7a967ed4c20e00fc966e3d30a09fed74216dc7.tar.gz gcc-8b7a967ed4c20e00fc966e3d30a09fed74216dc7.tar.bz2 |
libgfortran.h (GFC_STD_F2015): Add.
2014-10-06 Tobias Burnus <burnus@net-b.de>
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
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r-- | gcc/fortran/interface.c | 8 |
1 files changed, 7 insertions, 1 deletions
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); |