Commit a6cd299b by Janus Weil

re PR fortran/58470 ([OOP] ICE on invalid with FINAL procedure and type extension)

2014-02-08  Janus Weil  <janus@gcc.gnu.org>
	    Mikael Morin <mikael.morin@gcc.gnu.org>

	PR fortran/58470
	* class.c (generate_finalization_wrapper): Assert that proc_tree has
	been set in gfc_resolve_finalizers.
	* resolve.c (resolve_fl_derived0): Remove unnecessary call to
	gfc_is_finalizable.


2014-02-08  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/58470
	* gfortran.dg/finalize_22.f90: New.

Co-Authored-By: Mikael Morin <mikael@gcc.gnu.org>

From-SVN: r207636
parent df392740
2014-02-08 Janus Weil <janus@gcc.gnu.org>
Mikael Morin <mikael.morin@gcc.gnu.org>
PR fortran/58470
* class.c (generate_finalization_wrapper): Assert that proc_tree has
been set in gfc_resolve_finalizers.
* resolve.c (resolve_fl_derived0): Remove unnecessary call to
gfc_is_finalizable.
2014-02-07 Benno Schulenberg <bensberg@justemail.net>
PR translation/52289
......
......@@ -1880,8 +1880,7 @@ generate_finalization_wrapper (gfc_symbol *derived, gfc_namespace *ns,
for (fini = derived->f2k_derived->finalizers; fini; fini = fini->next)
{
if (!fini->proc_tree)
fini->proc_tree = gfc_find_sym_in_symtree (fini->proc_sym);
gcc_assert (fini->proc_tree); /* Should have been set in gfc_resolve_finalizers. */
if (fini->proc_tree->n.sym->attr.elemental)
{
fini_elem = fini;
......
......@@ -12455,10 +12455,6 @@ resolve_fl_derived0 (gfc_symbol *sym)
/* Add derived type to the derived type list. */
add_dt_to_dt_list (sym);
/* Check if the type is finalizable. This is done in order to ensure that the
finalization wrapper is generated early enough. */
gfc_is_finalizable (sym, NULL);
return true;
}
......
2014-02-08 Janus Weil <janus@gcc.gnu.org>
PR fortran/58470
* gfortran.dg/finalize_22.f90: New.
2014-02-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/60066
......
! { dg-do compile }
!
! PR 58470: [4.9 Regression] [OOP] ICE on invalid with FINAL procedure and type extension
!
! Contributed by Andrew Benson <abensonca@gmail.com>
module cf
type :: cfml
contains
final :: mld
end type cfml
type, extends(cfml) :: cfmde
end type cfmde
contains
subroutine mld(s) ! { dg-error "must be of type" }
class(cfml), intent(inout) :: s
end subroutine mld
end module cf
! { dg-final { cleanup-modules "cf" } }
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