OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [finalize_6.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! { dg-options "-std=f95" }
3
 
4
! Parsing of finalizer procedure definitions.
5
! Check that CONTAINS/FINAL in derived types is rejected for F95.
6
 
7
MODULE final_type
8
  IMPLICIT NONE
9
 
10
  TYPE :: mytype
11
    INTEGER :: fooarr(42)
12
    REAL :: foobar
13
  CONTAINS ! { dg-error "Fortran 2003" }
14
    FINAL :: finalize_single ! { dg-error "Fortran 2003" }
15
  END TYPE mytype
16
 
17
CONTAINS
18
 
19
  SUBROUTINE finalize_single (el)
20
    IMPLICIT NONE
21
    TYPE(mytype) :: el
22
    ! Do nothing in this test
23
  END SUBROUTINE finalize_single
24
 
25
END MODULE final_type
26
 
27
PROGRAM finalizer
28
  IMPLICIT NONE
29
  ! Do nothing
30
END PROGRAM finalizer
31
 
32
! TODO: Remove this once finalization is implemented.
33
! { dg-excess-errors "not yet implemented" }
34
 
35
! { dg-final { cleanup-modules "final_type" } }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.