===================================================================
@@ -12517,7 +12517,7 @@ 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",
===================================================================
@@ -10,6 +10,8 @@ module ct
contains
final :: aD
end type
+ type, extends(a) :: a1
+ end type
contains
subroutine aD(self)
type(a), intent(inout) :: self