2012-08-29 Alessandro Fanfarillo Tobias Burnus PR fortran/37336 * resolve.c (gfc_resolve_finalizers): Remove not-implemented error. 2012-08-29 Alessandro Fanfarillo Tobias Burnus PR fortran/37336 * gfortran.dg/coarray_poly_3.f90: Update dg-error. * gfortran.dg/auto_dealloc_2.f90: Update scan-tree-dump-times. * gfortran.dg/class_19.f03: Ditto. * gfortran.dg/finalize_4.f03: Remove dg-excess-errors for not implemented. * gfortran.dg/finalize_5.f03: Ditto. * gfortran.dg/finalize_7.f03: Ditto. diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 129c9bb..011d199 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -11218,10 +11218,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; } diff --git a/gcc/testsuite/gfortran.dg/auto_dealloc_2.f90 b/gcc/testsuite/gfortran.dg/auto_dealloc_2.f90 index e607b6a..9096b85 100644 --- a/gcc/testsuite/gfortran.dg/auto_dealloc_2.f90 +++ b/gcc/testsuite/gfortran.dg/auto_dealloc_2.f90 @@ -25,5 +25,5 @@ contains end program -! { dg-final { scan-tree-dump-times "__builtin_free" 3 "original" } } +! { dg-final { scan-tree-dump-times "__builtin_free" 4 "original" } } ! { dg-final { cleanup-tree-dump "original" } } diff --git a/gcc/testsuite/gfortran.dg/class_19.f03 b/gcc/testsuite/gfortran.dg/class_19.f03 index 63b8e06..884d6ae 100644 --- a/gcc/testsuite/gfortran.dg/class_19.f03 +++ b/gcc/testsuite/gfortran.dg/class_19.f03 @@ -39,5 +39,5 @@ program main end program main -! { dg-final { scan-tree-dump-times "__builtin_free" 11 "original" } } +! { dg-final { scan-tree-dump-times "__builtin_free" 14 "original" } } ! { dg-final { cleanup-tree-dump "original" } } diff --git a/gcc/testsuite/gfortran.dg/coarray_poly_3.f90 b/gcc/testsuite/gfortran.dg/coarray_poly_3.f90 index e6b19ae..8edd8d3 100644 --- a/gcc/testsuite/gfortran.dg/coarray_poly_3.f90 +++ b/gcc/testsuite/gfortran.dg/coarray_poly_3.f90 @@ -3,13 +3,13 @@ ! -subroutine cont1(x) ! { dg-error "has the CONTIGUOUS attribute but is not an array pointer or an assumed-shape array" } +subroutine cont1(x) ! { dg-error "has the CONTIGUOUS attribute but is not an array pointer or an assumed-shape or assumed-rank array" } type t end type t class(t), contiguous, allocatable :: x(:) end -subroutine cont2(x) ! { dg-error "has the CONTIGUOUS attribute but is not an array pointer or an assumed-shape array" } +subroutine cont2(x) ! { dg-error "has the CONTIGUOUS attribute but is not an array pointer or an assumed-shape or assumed-rank array" } type t end type t class(t), contiguous, allocatable :: x(:)[:] diff --git a/gcc/testsuite/gfortran.dg/finalize_4.f03 b/gcc/testsuite/gfortran.dg/finalize_4.f03 index 11e094f..b4c08f2 100644 --- a/gcc/testsuite/gfortran.dg/finalize_4.f03 +++ b/gcc/testsuite/gfortran.dg/finalize_4.f03 @@ -48,6 +48,3 @@ PROGRAM finalizer DEALLOCATE(mat) END PROGRAM finalizer - -! TODO: Remove this once finalization is implemented. -! { dg-excess-errors "not yet implemented" } diff --git a/gcc/testsuite/gfortran.dg/finalize_5.f03 b/gcc/testsuite/gfortran.dg/finalize_5.f03 index b9ec376..fb81531 100644 --- a/gcc/testsuite/gfortran.dg/finalize_5.f03 +++ b/gcc/testsuite/gfortran.dg/finalize_5.f03 @@ -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" } diff --git a/gcc/testsuite/gfortran.dg/finalize_7.f03 b/gcc/testsuite/gfortran.dg/finalize_7.f03 index 6ca4f55..5807ed5 100644 --- a/gcc/testsuite/gfortran.dg/finalize_7.f03 +++ b/gcc/testsuite/gfortran.dg/finalize_7.f03 @@ -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" }