Commit 6d2bee95 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/37336 ([F03] Finish derived-type finalization)

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>

        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.

From-SVN: r199388
parent b49eefa5
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
polymorphic arrays for allocatable intent(out) dummies.
(gfc_reset_vptr): New function, moved from trans-stmt.c
......
......@@ -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;
}
......
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.
2013-05-28 Tobias Burnus <burnus@net-b.de>
......
! { 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
......@@ -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" }
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