aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/parse.c')
-rw-r--r--gcc/fortran/parse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c
index c168c52..95a327b 100644
--- a/gcc/fortran/parse.c
+++ b/gcc/fortran/parse.c
@@ -2068,11 +2068,15 @@ endType:
{
/* Look for allocatable components. */
if (c->attr.allocatable
+ || (c->ts.type == BT_CLASS
+ && c->ts.u.derived->components->attr.allocatable)
|| (c->ts.type == BT_DERIVED && c->ts.u.derived->attr.alloc_comp))
sym->attr.alloc_comp = 1;
/* Look for pointer components. */
if (c->attr.pointer
+ || (c->ts.type == BT_CLASS
+ && c->ts.u.derived->components->attr.pointer)
|| (c->ts.type == BT_DERIVED && c->ts.u.derived->attr.pointer_comp))
sym->attr.pointer_comp = 1;