This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/52846] [F2008] Support submodules
- From: "pault at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 17 Jul 2015 17:24:17 +0000
- Subject: [Bug fortran/52846] [F2008] Support submodules
- Auto-submitted: auto-generated
- References: <bug-52846-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846
--- Comment #15 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Fri Jul 17 17:23:45 2015
New Revision: 225945
URL: https://gcc.gnu.org/viewcvs?rev=225945&root=gcc&view=rev
Log:
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
Added:
trunk/gcc/testsuite/gfortran.dg/submodule_1.f08
- copied, changed from r225943,
trunk/gcc/testsuite/gfortran.dg/submodule_1.f90
Removed:
trunk/gcc/testsuite/gfortran.dg/submodule_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/decl.c
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/module.c
trunk/gcc/testsuite/lib/fortran-modules.exp