http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55072



--- Comment #7 from janus at gcc dot gnu.org 2012-12-15 00:18:58 UTC ---

The following patch (which amounts to a partial revert of r156749) fixes the

behavior of comment #2 for me:





Index: gcc/fortran/trans-array.c

===================================================================

--- gcc/fortran/trans-array.c    (revision 194387)

+++ gcc/fortran/trans-array.c    (working copy)

@@ -6957,6 +6957,11 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr *

   ultimate_ptr_comp = false;

   ultimate_alloc_comp = false;



+  if (expr->symtree)

+    ultimate_ptr_comp = expr->symtree->n.sym->ts.type == BT_CLASS

+            ? CLASS_DATA (expr->symtree->n.sym)->attr.class_pointer

+            : expr->symtree->n.sym->attr.pointer;

+

   for (ref = expr->ref; ref; ref = ref->next)

     {

       if (ref->next == NULL)

Reply via email to