2015-07-17 Paul Thomas <pault@gcc.gnu.org>
commitdf8f279fee1d4571460bbd672f4c835484296935
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Jul 2015 17:23:45 +0000 (17 17:23 +0000)
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Jul 2015 17:23:45 +0000 (17 17:23 +0000)
tree8c5237225381a2a0cd6f8e9c085f9249fa064ca6
parentff96563abc523afa1e51bcd9d4effc58c5e32d23
2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/52846
* decl.c (gfc_match_end): Pick out declared submodule name from
the composite identifier.
* gfortran.h : Add 'submodule_name' to gfc_use_list structure.
* module.c (gfc_match_submodule): Define submodule_name and add
static 'submodule_name'.
(gfc_match_submodule): Build up submodule filenames, using '@'
as a delimiter. Store the output filename in 'submodule_name'.
Similarly, the submodule identifier is built using '.' as an
identifier.
(gfc_dump_module): If current state is COMP_SUBMODULE, write
to file 'submodule_name', using SUBMODULE_EXTENSION.
(gfc_use_module): Similarly, use the 'submodule_name' field in
the gfc_use_list structure and SUBMODULE_EXTENSION to read the
implicitly used submodule files.

2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/52846
* lib/fortran-modules.exp (proc cleanup-submodules): New
procedure.
* gfortran.dg/submodule_1.f08: Change extension and clean up
the submodule files.
* gfortran.dg/submodule_2.f08: ditto
* gfortran.dg/submodule_6.f08: ditto
* gfortran.dg/submodule_7.f08: ditto
* gfortran.dg/submodule_8.f08: New test
* gfortran.dg/submodule_9.f08: New test

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225945 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/fortran/ChangeLog
gcc/fortran/decl.c
gcc/fortran/gfortran.h
gcc/fortran/module.c
gcc/testsuite/gfortran.dg/submodule_1.f08 [moved from gcc/testsuite/gfortran.dg/submodule_1.f90 with 96% similarity]
gcc/testsuite/lib/fortran-modules.exp