From d0e8d89223cf24f067ddca3e01842374765af89a Mon Sep 17 00:00:00 2001 From: Paul Thomas Date: Fri, 17 Jul 2015 17:26:42 +0000 Subject: [PATCH] re PR fortran/52846 ([F2008] Support submodules) 2015-07-17 Paul Thomas 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 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: r225956 --- gcc/testsuite/gfortran.dg/{submodule_7.f90 => submodule_7.f08} | 2 ++ 1 file changed, 2 insertions(+) rename gcc/testsuite/gfortran.dg/{submodule_7.f90 => submodule_7.f08} (97%) diff --git a/gcc/testsuite/gfortran.dg/submodule_7.f90 b/gcc/testsuite/gfortran.dg/submodule_7.f08 similarity index 97% rename from gcc/testsuite/gfortran.dg/submodule_7.f90 rename to gcc/testsuite/gfortran.dg/submodule_7.f08 index fd1bee6296c..a183f50e46c 100644 --- a/gcc/testsuite/gfortran.dg/submodule_7.f90 +++ b/gcc/testsuite/gfortran.dg/submodule_7.f08 @@ -145,3 +145,5 @@ program main call verify_cleanup (c_1, c_2) !... end program main +! { dg-final { cleanup-submodules "color_points@color_points_a" } } +! { dg-final { cleanup-submodules "color_points@color_points_b" } } -- 2.30.2