From 528622fd85a8e2f7c8f70c4e8a9486c4c426c4a5 Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Wed, 16 Feb 2011 21:51:56 +0100 Subject: re PR fortran/47745 ([OOP] Segfault with CLASS(*) and derived type dummy arguments) 2011-02-16 Janus Weil PR fortran/47745 * class.c (gfc_build_class_symbol): Set 'class_ok' attribute. * decl.c (build_sym,attr_decl1): Move setting of 'class_ok' into 'gfc_build_class_symbol'. (gfc_match_decl_type_spec): Reject unlimited polymorphism. * interface.c (matching_typebound_op): Check for 'class_ok' attribute. * match.c (select_type_set_tmp): Move setting of 'class_ok' into 'gfc_build_class_symbol'. * primary.c (gfc_variable_attr): Check for 'class_ok' attribute. 2011-02-16 Janus Weil PR fortran/47745 * gfortran.dg/class_39.f03: New. From-SVN: r170223 --- gcc/fortran/match.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'gcc/fortran/match.c') diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 01b88ff..d2d9f5f 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -4536,11 +4536,8 @@ select_type_set_tmp (gfc_typespec *ts) gfc_add_pointer (&tmp->n.sym->attr, NULL); gfc_add_flavor (&tmp->n.sym->attr, FL_VARIABLE, name, NULL); if (ts->type == BT_CLASS) - { - gfc_build_class_symbol (&tmp->n.sym->ts, &tmp->n.sym->attr, - &tmp->n.sym->as, false); - tmp->n.sym->attr.class_ok = 1; - } + gfc_build_class_symbol (&tmp->n.sym->ts, &tmp->n.sym->attr, + &tmp->n.sym->as, false); tmp->n.sym->attr.select_type_temporary = 1; /* Add an association for it, so the rest of the parser knows it is -- cgit v1.1