https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79434
--- Comment #5 from Paul Thomas <pault at gcc dot gnu.org> --- Author: pault Date: Sun Mar 26 20:01:07 2017 New Revision: 246486 URL: https://gcc.gnu.org/viewcvs?rev=246486&root=gcc&view=rev Log: 2017-03-26 Paul Thomas <pa...@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-03-26 Paul Thomas <pa...@gcc.gnu.org> PR fortran/79434 * gfortran.dg/submodule_25.f08 : New test. Added: branches/gcc-6-branch/gcc/testsuite/gfortran.dg/submodule_25.f08 Modified: branches/gcc-6-branch/gcc/fortran/ChangeLog branches/gcc-6-branch/gcc/fortran/parse.c branches/gcc-6-branch/gcc/testsuite/ChangeLog