aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 9e628f1..152678f 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -12395,6 +12395,9 @@ gfc_resolve_finalizers (gfc_symbol* derived, bool *finalizable)
/* Skip this finalizer if we already resolved it. */
if (list->proc_tree)
{
+ if (list->proc_tree->n.sym->formal->sym->as == NULL
+ || list->proc_tree->n.sym->formal->sym->as->rank == 0)
+ seen_scalar = true;
prev_link = &(list->next);
continue;
}
@@ -12489,7 +12492,7 @@ gfc_resolve_finalizers (gfc_symbol* derived, bool *finalizable)
}
/* Is this the/a scalar finalizer procedure? */
- if (!arg->as || arg->as->rank == 0)
+ if (my_rank == 0)
seen_scalar = true;
/* Find the symtree for this procedure. */