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
This commit is contained in:
parent
b49eefa574
commit
6d2bee95d8
8 changed files with 48 additions and 19 deletions
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
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.
|
||||
|
|
31
gcc/testsuite/gfortran.dg/finalize_11.f90
Normal file
31
gcc/testsuite/gfortran.dg/finalize_11.f90
Normal file
|
@ -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
|
|
@ -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" }
|
||||
|
|
Loading…
Add table
Reference in a new issue