2013-09-15 Tobias Burnus <burnus@net-b.de>
PR fortran/58356
* class.c (generate_finalization_wrapper): Init proc_tree if
not yet resolved.
2013-09-15 Tobias Burnus <burnus@net-b.de>
PR fortran/58356
* gfortran.dg/finalize_19.f90: New.
@@ -1881,6 +1881,8 @@ 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);
if (fini->proc_tree->n.sym->attr.elemental)
{
fini_elem = fini;
new file mode 100644
@@ -0,0 +1,21 @@
+! { dg-do compile }
+!
+! PR fortran/58356
+!
+! Contributed by Andrew Benson
+!
+module ct
+ type :: cfl
+ contains
+ final :: cfld
+ end type cfl
+ type, extends(cfl) :: cfde
+ contains
+ end type cfde
+contains
+ subroutine cfld(self)
+ implicit none
+ type(cfl), intent(inout) :: self
+ return
+ end subroutine cfld
+end module ct