diff options
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 6bc5fde..8f32d1a 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -10494,6 +10494,12 @@ resolve_fl_derived (gfc_symbol *sym) && resolve_typespec_used (&c->ts, &c->loc, c->name) == FAILURE) return FAILURE; + /* If this type is an extension, set the accessibility of the parent + component. */ + if (super_type && c == sym->components + && strcmp (super_type->name, c->name) == 0) + c->attr.access = super_type->attr.access; + /* If this type is an extension, see if this component has the same name as an inherited type-bound procedure. */ if (super_type |