aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2015-07-17 17:24:32 +0000
committerPaul Thomas <pault@gcc.gnu.org>2015-07-17 17:24:32 +0000
commit09155f6980eb9dcd6bd2c5d10be8c8a4fde89394 (patch)
tree84918c944552aed5891a21429f0034c26b1147cf
parent3d5dc929f4077f3d5e8d6fddaa4f196d21a31ebc (diff)
downloadgcc-09155f6980eb9dcd6bd2c5d10be8c8a4fde89394.zip
gcc-09155f6980eb9dcd6bd2c5d10be8c8a4fde89394.tar.gz
gcc-09155f6980eb9dcd6bd2c5d10be8c8a4fde89394.tar.bz2
re PR fortran/52846 ([F2008] Support submodules)
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 From-SVN: r225946
-rw-r--r--gcc/testsuite/gfortran.dg/submodule_2.f08 (renamed from gcc/testsuite/gfortran.dg/submodule_2.f90)2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/submodule_2.f90 b/gcc/testsuite/gfortran.dg/submodule_2.f08
index 43456d5..60925ec 100644
--- a/gcc/testsuite/gfortran.dg/submodule_2.f90
+++ b/gcc/testsuite/gfortran.dg/submodule_2.f08
@@ -98,3 +98,5 @@
if (any (arg%greeting .ne. ["adieu, people!", "adieu, people!"])) call abort
contains
end program
+! { dg-final { cleanup-submodules "foo_interface@foo_interface_son" } }
+! { dg-final { cleanup-submodules "foo_interface@foo_interface_daughter" } }