diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2016-03-12 13:59:10 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2016-03-12 13:59:10 +0000 |
commit | 70112e2a64f7cbeddb9a1155e6cb65e188f6d7e3 (patch) | |
tree | 2dd68bc74cb9cafbd9ed771b20bddc58b2da0a21 /gcc/fortran/resolve.c | |
parent | 0529235de5d3a6015a1031f2761d1580cc8c20fa (diff) | |
download | gcc-70112e2a64f7cbeddb9a1155e6cb65e188f6d7e3.zip gcc-70112e2a64f7cbeddb9a1155e6cb65e188f6d7e3.tar.gz gcc-70112e2a64f7cbeddb9a1155e6cb65e188f6d7e3.tar.bz2 |
re PR fortran/70031 (Error in recursive module subroutine declaration if declared as "module recursive")
2016-03-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/70031
* decl.c (gfc_match_prefix): Treat the 'module' prefix in the
same way as the others, rather than fixing it to come last.
(gfc_match_function_decl, gfc_match_subroutine): After errors
in 'copy_prefix', emit them immediately in the case of module
procedures to prevent a later ICE.
PR fortran/69524
* decl.c (gfc_match_submod_proc): Permit 'module procedure'
declarations within the contains section of modules as well as
submodules.
* resolve.c (resolve_fl_procedure): Likewise.
*trans-decl.c (build_function_decl): Change the gcc_assert to
allow all forms of module procedure declarations within module
contains sections.
2016-03-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/70031
* gfortran.dg/submodule_14.f08: New test
PR fortran/69524
* gfortran.dg/submodule_15.f08: New test
From-SVN: r234161
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 556c846..55ab2ec 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -11905,7 +11905,7 @@ resolve_fl_procedure (gfc_symbol *sym, int mp_flag) "in %qs at %L", sym->name, &sym->declared_at); return false; } - if (sym->attr.external && sym->attr.function + if (sym->attr.external && sym->attr.function && !sym->attr.module_procedure && ((sym->attr.if_source == IFSRC_DECL && !sym->attr.procedure) || sym->attr.contained)) { |