re PR fortran/70031 (Error in recursive module subroutine declaration if declared...
authorPaul Thomas <pault@gcc.gnu.org>
Sat, 12 Mar 2016 13:59:10 +0000 (13:59 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Sat, 12 Mar 2016 13:59:10 +0000 (13:59 +0000)
commit70112e2a64f7cbeddb9a1155e6cb65e188f6d7e3
tree2dd68bc74cb9cafbd9ed771b20bddc58b2da0a21
parent0529235de5d3a6015a1031f2761d1580cc8c20fa
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
gcc/fortran/ChangeLog
gcc/fortran/decl.c
gcc/fortran/resolve.c
gcc/fortran/trans-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/submodule_14.f08 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/submodule_15.f08 [new file with mode: 0644]