URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [finalize_7.f03] - Rev 302
Compare with Previous | Blame | View Log
! { dg-do compile }! { dg-options "-Wsurprising" }! Implementation of finalizer procedures.! Check for expected warnings on dubious FINAL constructs.MODULE final_typeIMPLICIT NONETYPE :: type_1INTEGER, ALLOCATABLE :: fooarr(:)REAL :: foobarCONTAINS! Non-scalar procedures should be assumed shapeFINAL :: fin1_scalarFINAL :: fin1_shape_1FINAL :: fin1_shape_2END TYPE type_1TYPE :: type_2 ! { dg-warning "Only array FINAL procedures" }REAL :: xCONTAINS! No scalar finalizer, only array onesFINAL :: fin2_vectorEND TYPE type_2CONTAINSSUBROUTINE fin1_scalar (el)IMPLICIT NONETYPE(type_1) :: elEND SUBROUTINE fin1_scalarSUBROUTINE fin1_shape_1 (v) ! { dg-warning "assumed shape" }IMPLICIT NONETYPE(type_1) :: v(*)END SUBROUTINE fin1_shape_1SUBROUTINE fin1_shape_2 (v) ! { dg-warning "assumed shape" }IMPLICIT NONETYPE(type_1) :: v(42, 5)END SUBROUTINE fin1_shape_2SUBROUTINE fin2_vector (v)IMPLICIT NONETYPE(type_2) :: v(:)END SUBROUTINE fin2_vectorEND MODULE final_typePROGRAM finalizerIMPLICIT NONE! Nothing hereEND PROGRAM finalizer! TODO: Remove this once finalization is implemented.! { dg-excess-errors "not yet implemented" }! { dg-final { cleanup-modules "final_type" } }
