aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r--gcc/fortran/module.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index f10e43b..f75e3fd 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -2311,6 +2311,9 @@ mio_component_ref (gfc_component **cp, gfc_symbol *sym)
{
mio_internal_string (name);
+ if (sym && sym->attr.is_class)
+ sym = sym->components->ts.u.derived;
+
/* It can happen that a component reference can be read before the
associated derived type symbol has been loaded. Return now and
wait for a later iteration of load_needed. */