diff options
author | Janus Weil <janus@gcc.gnu.org> | 2018-09-10 23:25:33 +0200 |
---|---|---|
committer | Janus Weil <janus@gcc.gnu.org> | 2018-09-10 23:25:33 +0200 |
commit | d4beaf2a221eb97bc7d074b99777cd780e3e0793 (patch) | |
tree | 6a12ccc8b7d6c83e132bd5e9738cb80daed54d2d /gcc/fortran/decl.c | |
parent | 6f2dde9cf68ab68eeadad7cf2772bbba01c997ff (diff) | |
download | gcc-d4beaf2a221eb97bc7d074b99777cd780e3e0793.zip gcc-d4beaf2a221eb97bc7d074b99777cd780e3e0793.tar.gz gcc-d4beaf2a221eb97bc7d074b99777cd780e3e0793.tar.bz2 |
re PR fortran/85395 ([F03] private clause contained in derived type acquires spurious scope)
fix PR 85395
2018-09-10 Janus Weil <janus@gcc.gnu.org>
PR fortran/85395
* decl.c (match_binding_attributes): Use correct default accessibility
for procedure pointer components.
2018-09-10 Janus Weil <janus@gcc.gnu.org>
PR fortran/85395
* gfortran.dg/proc_ptr_comp_52.f90: New test case.
From-SVN: r264196
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r-- | gcc/fortran/decl.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) { |