From 22061030a7395524b390bf0cc7382802586cfd53 Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Thu, 30 Dec 2010 12:53:35 +0100 Subject: re PR fortran/47085 ([OOP] Problem in allocate( SOURCE=) for polymorphic component) 2010-12-30 Janus Weil PR fortran/47085 * match.c (gfc_match_allocate): Check for 'class_ok'. * primary.c (gfc_match_varspec): Ditto. 2010-12-30 Janus Weil PR fortran/47085 * gfortran.dg/allocate_class_1.f90: New. From-SVN: r168340 --- gcc/fortran/primary.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/fortran/primary.c') diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index da028b4..ed85398 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -1774,7 +1774,8 @@ gfc_match_varspec (gfc_expr *primary, int equiv_flag, bool sub_flag, && !gfc_is_proc_ptr_comp (primary, NULL) && !(gfc_matching_procptr_assignment && sym->attr.flavor == FL_PROCEDURE)) - || (sym->ts.type == BT_CLASS && CLASS_DATA (sym)->attr.dimension)) + || (sym->ts.type == BT_CLASS && sym->attr.class_ok + && CLASS_DATA (sym)->attr.dimension)) { /* In EQUIVALENCE, we don't know yet whether we are seeing an array, character variable or array of character -- cgit v1.1