CLASS_DATA (fsym)->attr.class_pointer
|| CLASS_DATA (fsym)->attr.allocatable);
}
- else if (UNLIMITED_POLY (fsym) && e->ts.type != BT_CLASS)
+ else if (UNLIMITED_POLY (fsym) && e->ts.type != BT_CLASS
+ && gfc_expr_attr (e).flavor != FL_PROCEDURE)
{
/* The intrinsic type needs to be converted to a temporary
CLASS object for the unlimited polymorphic formal. */
|| gfc_is_class_array_ref (expr1, NULL)
|| gfc_is_class_scalar_expr (expr1)
|| gfc_is_class_array_ref (expr2, NULL)
- || gfc_is_class_scalar_expr (expr2));
+ || gfc_is_class_scalar_expr (expr2))
+ && lhs_attr.flavor != FL_PROCEDURE;
realloc_flag = flag_realloc_lhs
&& gfc_is_reallocatable_lhs (expr1)