From d4beaf2a221eb97bc7d074b99777cd780e3e0793 Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Mon, 10 Sep 2018 23:25:33 +0200 Subject: re PR fortran/85395 ([F03] private clause contained in derived type acquires spurious scope) fix PR 85395 2018-09-10 Janus Weil PR fortran/85395 * decl.c (match_binding_attributes): Use correct default accessibility for procedure pointer components. 2018-09-10 Janus Weil PR fortran/85395 * gfortran.dg/proc_ptr_comp_52.f90: New test case. From-SVN: r264196 --- gcc/fortran/decl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/fortran/decl.c') diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 0329883..3d19ad4 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -10570,7 +10570,8 @@ match_binding_attributes (gfc_typebound_proc* ba, bool generic, bool ppc) done: if (ba->access == ACCESS_UNKNOWN) - ba->access = gfc_typebound_default_access; + ba->access = ppc ? gfc_current_block()->component_access + : gfc_typebound_default_access; if (ppc && !seen_ptr) { -- cgit v1.1