2013-05-27 Tobias Burnus <burnus@net-b.de>
PR fortran/37336
* resolve.c (gfc_resolve_finalizers): Remove not implemented error.
2013-05-27 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.
@@ -11241,10 +11241,6 @@ error:
" 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;
}
@@ -48,6 +48,3 @@ PROGRAM finalizer
DEALLOCATE(mat)
END PROGRAM finalizer
-
-! TODO: Remove this once finalization is implemented.
-! { dg-excess-errors "not yet implemented" }
@@ -107,6 +107,3 @@ PROGRAM finalizer
IMPLICIT NONE
! Nothing here, errors above
END PROGRAM finalizer
-
-! TODO: Remove this once finalization is implemented.
-! { dg-excess-errors "not yet implemented" }
@@ -10,9 +10,9 @@ MODULE final_type
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
@@ -28,6 +28,3 @@ PROGRAM finalizer
IMPLICIT NONE
! Do nothing
END PROGRAM finalizer
-
-! TODO: Remove this once finalization is implemented.
-! { dg-excess-errors "not yet implemented" }
@@ -52,6 +52,3 @@ PROGRAM finalizer
IMPLICIT NONE
! Nothing here
END PROGRAM finalizer
-
-! TODO: Remove this once finalization is implemented.
-! { dg-excess-errors "not yet implemented" }
@@ -0,0 +1,31 @@
+! { 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