re PR fortran/52846 ([F2008] Support submodules)
authorPaul Thomas <pault@gcc.gnu.org>
Wed, 5 Aug 2015 12:06:25 +0000 (12:06 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Wed, 5 Aug 2015 12:06:25 +0000 (12:06 +0000)
commita56ea54ab05e657c9a140b0e14d6a7e576aa58c2
treec59e00ca13501b665157dd141e5829a813fb5c5c
parent8282c8776d3727948daa41fa340f6b16d4f563d4
re PR fortran/52846 ([F2008] Support submodules)

2015-08-05  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/52846
* module.c (check_access): Return true if new static flag
'dump_smod' is true..
(gfc_dump_module): Rename original 'dump_module' and call from
new version. Use 'dump_smod' rather than the stack state to
determine if a submodule is being processed. The new version of
this procedure sets 'dump_smod' depending on the stack state and
then writes both the mod and smod files if a module is being
processed or just the smod for a submodule.
(gfc_use_module): Eliminate the check for module_name and
submodule_name being the same.
* trans-decl.c (gfc_finish_var_decl, gfc_build_qualified_array,
get_proc_pointer_decl): Set TREE_PUBLIC unconditionally and use
the conditions to set DECL_VISIBILITY as hidden and to set as
true DECL_VISIBILITY_SPECIFIED.

2015-08-05  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/52846

* lib/fortran-modules.exp: Call cleanup-submodules from
cleanup-modules.
* gfortran.dg/public_private_module_2.f90: Add two XFAILS to
cover the cases where private entities are no longer optimized
away.
* gfortran.dg/public_private_module_6.f90: Add an XFAIL for the
same reason.
* gfortran.dg/submodule_1.f08: Change cleanup module names.
* gfortran.dg/submodule_5.f08: The same.
* gfortran.dg/submodule_9.f08: The same.
* gfortran.dg/submodule_10.f08: New test

From-SVN: r226622
gcc/fortran/ChangeLog
gcc/fortran/module.c
gcc/fortran/trans-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/public_private_module_2.f90
gcc/testsuite/gfortran.dg/public_private_module_6.f90
gcc/testsuite/gfortran.dg/submodule_1.f08
gcc/testsuite/gfortran.dg/submodule_10.f08 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/submodule_5.f08
gcc/testsuite/gfortran.dg/submodule_9.f08
gcc/testsuite/lib/fortran-modules.exp