https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127258

Mikael Morin <mikael at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4

--- Comment #1 from Mikael Morin <mikael at gcc dot gnu.org> ---
This  means the following lines from gfc_conv_procedure_call can be removed,
as they are covering exactly the same case, that is polymorphic actual and
non-polymorphic dummy:

  8145                else if (gfc_is_class_array_ref (e, NULL)
  8146                         && fsym && fsym->ts.type == BT_DERIVED
  8147                         && copy_in_out_allowed (fsym, e, nodesc_arg))
  8148                  /* The actual argument is a component reference to an
  8149                     array of derived types.  In this case, the argument
  8150                     is converted to a temporary, which is passed and
then
  8151                     written back after the procedure call.  */
  8152                  gfc_conv_subref_array_arg (&parmse, e, nodesc_arg,
  8153                                             fsym->attr.intent,
  8154                                             fsym->attr.pointer);
  8155
  8156                else if (gfc_is_class_array_function (e)
  8157                         && fsym && fsym->ts.type == BT_DERIVED
  8158                         && copy_in_out_allowed (fsym, e, nodesc_arg))
  8159                  /* See previous comment.  For function actual argument,
  8160                     the write out is not needed so the intent is set as
  8161                     intent in.  */
  8162                  {
  8163                    e->must_finalize = 1;
  8164                    gfc_conv_subref_array_arg (&parmse, e, nodesc_arg,
  8165                                               INTENT_IN,
fsym->attr.pointer);
  8166                  }

Reply via email to