re PR fortran/79434 ([submodules] separate module procedure breaks encapsulation)
authorPaul Thomas <pault@gcc.gnu.org>
Mon, 20 Feb 2017 09:42:48 +0000 (09:42 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Mon, 20 Feb 2017 09:42:48 +0000 (09:42 +0000)
commit1ca6a74f8900cd8e18a5603eaea2c16f4f0d1e36
treeb5e680edda864662c08e9de5a6a1487bc94cf1d6
parent8f712b76904c9e495d16817fa93f8edde4c1f0cd
re PR fortran/79434 ([submodules] separate module procedure breaks encapsulation)

2017-02-20  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/79434
* parse.c (check_component, parse_union): Whitespace.
(set_syms_host_assoc): For a derived type, check if the module
in which it was declared is one of the submodule ancestors. If
it is, make the components public. Otherwise, reset attribute
'host_assoc' and set 'use-assoc' so that encapsulation is
preserved.

2017-02-20  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/79434
* gfortran.dg/submodule_25.f08 : New test.

From-SVN: r245595
gcc/fortran/ChangeLog
gcc/fortran/parse.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/submodule_25.f08 [new file with mode: 0644]