Commit 802583a2 by Janus Weil

re PR fortran/58175 ([OOP] Incorrect warning message on scalar finalizer)

2016-12-03  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/58175
	* resolve.c (gfc_resolve_finalizers): Prevent bogus warning.

2016-12-03  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/58175
	* gfortran.dg/finalize_30.f90: Extend test case.

From-SVN: r243218
parent 98ff2d6b
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.
......
......@@ -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",
......
2016-12-03 Janus Weil <janus@gcc.gnu.org>
PR fortran/58175
* gfortran.dg/finalize_30.f90: Extend test case.
2016-12-02 Jakub Jelinek <jakub@redhat.com>
PR c++/78649
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment