]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/fortran/expr.c
re PR fortran/78990 (ICE when assigning polymorphic array function result)
[thirdparty/gcc.git] / gcc / fortran / expr.c
index e1c0caccdc1056c12dfc87687395de4c158e3a48..428fce1ad045af2276465b1ab6bd37265b902626 100644 (file)
@@ -4844,14 +4844,15 @@ gfc_is_alloc_class_scalar_function (gfc_expr *expr)
 /* Determine if an expression is a function with an allocatable class array
    result.  */
 bool
-gfc_is_alloc_class_array_function (gfc_expr *expr)
+gfc_is_class_array_function (gfc_expr *expr)
 {
   if (expr->expr_type == EXPR_FUNCTION
       && expr->value.function.esym
       && expr->value.function.esym->result
       && expr->value.function.esym->result->ts.type == BT_CLASS
       && CLASS_DATA (expr->value.function.esym->result)->attr.dimension
-      && CLASS_DATA (expr->value.function.esym->result)->attr.allocatable)
+      && (CLASS_DATA (expr->value.function.esym->result)->attr.allocatable
+         || CLASS_DATA (expr->value.function.esym->result)->attr.pointer))
     return true;
 
   return false;