+2016-12-03 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/58175
+ * resolve.c (gfc_resolve_finalizers): Prevent bogus warning.
+
2016-12-02 Steven G. Kargl <kargl@gcc.gnu.org>
* simplify.c (gfc_convert_char_constant): Free result on error.
/* Warn if we haven't seen a scalar finalizer procedure (but we know there
were nodes in the list, must have been for arrays. It is surely a good
idea to have a scalar version there if there's something to finalize. */
- if (warn_surprising && result && !seen_scalar)
+ if (warn_surprising && derived->f2k_derived->finalizers && !seen_scalar)
gfc_warning (OPT_Wsurprising,
"Only array FINAL procedures declared for derived type %qs"
" defined at %L, suggest also scalar one",