[Bug fortran/58175] Incorrect warning message on scalar finalizor
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Aug 16 19:48:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58175
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-08-16
CC| |burnus at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Untested patch.
(The second part just makes use of the following existing line:
my_rank = (arg->as ? arg->as->rank : 0); )
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 067288d..28321bb 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -11124,6 +11124,9 @@ gfc_resolve_finalizers (gfc_symbol* derived)
/* 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;
}
@@ -11217,7 +11220,7 @@ gfc_resolve_finalizers (gfc_symbol* derived)
}
/* 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. */
More information about the Gcc-bugs
mailing list