diff options
Diffstat (limited to 'gcc/fortran/trans-types.c')
-rw-r--r-- | gcc/fortran/trans-types.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c index b66941f..bec2a11 100644 --- a/gcc/fortran/trans-types.c +++ b/gcc/fortran/trans-types.c @@ -2421,6 +2421,9 @@ gfc_get_derived_type (gfc_symbol * derived) && !c->attr.proc_pointer) field_type = build_pointer_type (field_type); + if (c->attr.pointer) + field_type = gfc_nonrestricted_type (field_type); + /* vtype fields can point to different types to the base type. */ if (c->ts.type == BT_DERIVED && c->ts.u.derived->attr.vtype) field_type = build_pointer_type_for_mode (TREE_TYPE (field_type), |