aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r--gcc/fortran/decl.c3
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)
{