+2013-05-28 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/37336
+ * resolve.c (gfc_resolve_finalizers): Remove not implemented error.
+
2013-05-28 Tobias Burnus <burnus@net-b.de>
* trans-expr.c (gfc_conv_procedure_call): Deallocate
" defined at %L, suggest also scalar one",
derived->name, &derived->declared_at);
- /* TODO: Remove this error when finalization is finished. */
- gfc_error ("Finalization at %L is not yet implemented",
- &derived->declared_at);
-
gfc_find_derived_vtab (derived);
return result;
}
+2013-05-28 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/37336
+ * gfortran.dg/finalize_11.f90: New.
+ * gfortran.dg/finalize_4.f03: Remove dg-error.
+ * gfortran.dg/finalize_5.f03: Ditto.
+ * gfortran.dg/finalize_6.f03: Ditto.
+ * gfortran.dg/finalize_7.f03: Ditto.
+
2013-05-28 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/class_array_16.f90: New.
--- /dev/null
+! { dg-do compile }
+! { dg-options "-std=f2003" }
+!
+! Copied from finalize_6.f90 - was before rejected as the finalization
+! wrapper uses TS29913 (-std=f2008ts) features.
+!
+
+MODULE final_type
+ IMPLICIT NONE
+
+ TYPE :: mytype
+ INTEGER :: fooarr(42)
+ REAL :: foobar
+ CONTAINS
+ FINAL :: finalize_single
+ END TYPE mytype
+
+CONTAINS
+
+ SUBROUTINE finalize_single (el)
+ IMPLICIT NONE
+ TYPE(mytype) :: el
+ ! Do nothing in this test
+ END SUBROUTINE finalize_single
+
+END MODULE final_type
+
+PROGRAM finalizer
+ IMPLICIT NONE
+ ! Do nothing
+END PROGRAM finalizer
DEALLOCATE(mat)
END PROGRAM finalizer
-
-! TODO: Remove this once finalization is implemented.
-! { dg-excess-errors "not yet implemented" }
IMPLICIT NONE
! Nothing here, errors above
END PROGRAM finalizer
-
-! TODO: Remove this once finalization is implemented.
-! { dg-excess-errors "not yet implemented" }
TYPE :: mytype
INTEGER :: fooarr(42)
REAL :: foobar
- CONTAINS ! { dg-error "Fortran 2003" }
- FINAL :: finalize_single ! { dg-error "Fortran 2003" }
- END TYPE mytype
+ CONTAINS ! { dg-error "Fortran 2003: CONTAINS block in derived type definition" }
+ FINAL :: finalize_single ! { dg-error "Fortran 2003: FINAL procedure declaration|FINAL procedure 'finalize_single' at .1. is not a SUBROUTINE" }
+ END TYPE mytype ! { dg-error "Fortran 2008: Derived type definition at .1. with empty CONTAINS section" }
CONTAINS
IMPLICIT NONE
! Do nothing
END PROGRAM finalizer
-
-! TODO: Remove this once finalization is implemented.
-! { dg-excess-errors "not yet implemented" }
IMPLICIT NONE
! Nothing here
END PROGRAM finalizer
-
-! TODO: Remove this once finalization is implemented.
-! { dg-excess-errors "not yet implemented" }