diff options
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r-- | gcc/fortran/expr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index b028d81..60f6080 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -5291,7 +5291,8 @@ gfc_check_vardef_context (gfc_expr* e, bool pointer, bool alloc_obj, component. Note that (normal) assignment to procedure pointers is not possible. */ check_intentin = !own_scope; - ptr_component = (sym->ts.type == BT_CLASS && CLASS_DATA (sym)) + ptr_component = (sym->ts.type == BT_CLASS && sym->ts.u.derived + && CLASS_DATA (sym)) ? CLASS_DATA (sym)->attr.class_pointer : sym->attr.pointer; for (ref = e->ref; ref && check_intentin; ref = ref->next) { |