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

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-02-23 
22:34:31 UTC ---
The issue seems to be in gfc_conv_array_parameter - or rather in the called
gfc_conv_expr_descriptor. There, one has:

        full = gfc_full_array_ref_p (info->ref, NULL);
      if (full && !transposed_dims (ss))
          else if (se->want_pointer)
              se->expr = gfc_build_addr_expr (NULL_TREE, desc);
          return;

However, that's wrong if one needs to modify the bounds. Thus, in this special
case (fsym == pointer/class_pointer && fsym->attr.intent == INTENT_IN plus last
ref != AR_FULL), one has to create a new descriptor.

Reply via email to