From 1251a8be603722c2bf1c894c987cfe2f724d1568 Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Wed, 19 Feb 2014 12:52:39 +0100 Subject: re PR fortran/60232 ([OOP] The rank of the element in the structure constructor does not match that of the component) 2014-02-19 Janus Weil PR fortran/60232 * expr.c (gfc_get_variable_expr): Don't add REF_ARRAY for dimensionful functions, which are used as procedure pointer target. 2014-02-19 Janus Weil PR fortran/60232 * gfortran.dg/typebound_proc_33.f90: New. From-SVN: r207896 --- gcc/fortran/expr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gcc/fortran/expr.c') diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index fe6eab5..fe92c53a 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -3972,9 +3972,10 @@ gfc_get_variable_expr (gfc_symtree *var) e->symtree = var; e->ts = var->n.sym->ts; - if ((var->n.sym->as != NULL && var->n.sym->ts.type != BT_CLASS) - || (var->n.sym->ts.type == BT_CLASS && CLASS_DATA (var->n.sym) - && CLASS_DATA (var->n.sym)->as)) + if (var->n.sym->attr.flavor != FL_PROCEDURE + && ((var->n.sym->as != NULL && var->n.sym->ts.type != BT_CLASS) + || (var->n.sym->ts.type == BT_CLASS && CLASS_DATA (var->n.sym) + && CLASS_DATA (var->n.sym)->as))) { e->rank = var->n.sym->ts.type == BT_CLASS ? CLASS_DATA (var->n.sym)->as->rank : var->n.sym->as->rank; -- cgit v1.1