2016-03-12 Paul Thomas <pault@gcc.gnu.org>
commit76e207a91aed824957bb6829bade8ba71aba6977
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 12 Mar 2016 13:59:10 +0000 (12 13:59 +0000)
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 12 Mar 2016 13:59:10 +0000 (12 13:59 +0000)
tree2dd68bc74cb9cafbd9ed771b20bddc58b2da0a21
parent1c1a1b9a6a88eefc9b6420840a19fc964725cea9
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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234161 138bc75d-0d04-0410-961f-82ee72b054a4
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]