https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79434
--- Comment #2 from Paul Thomas <pault at gcc dot gnu.org> --- Author: pault Date: Mon Feb 20 09:42:48 2017 New Revision: 245595 URL: https://gcc.gnu.org/viewcvs?rev=245595&root=gcc&view=rev Log: 2017-02-20 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-02-20 Paul Thomas <pa...@gcc.gnu.org> PR fortran/79434 * gfortran.dg/submodule_25.f08 : New test. Added: trunk/gcc/testsuite/gfortran.dg/submodule_25.f08 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/parse.c trunk/gcc/testsuite/ChangeLog