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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [finalize_8.f03] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
 
3
! Parsing of finalizer procedure definitions.
4
! Check that FINAL-declarations are only allowed on types defined in the
5
! specification part of a module.
6
 
7
MODULE final_type
8
  IMPLICIT NONE
9
 
10
CONTAINS
11
 
12
  SUBROUTINE bar
13
    IMPLICIT NONE
14
 
15
    TYPE :: mytype
16
      INTEGER, ALLOCATABLE :: fooarr(:)
17
      REAL :: foobar
18
    CONTAINS
19
      FINAL :: myfinal ! { dg-error "in the specification part of a MODULE" }
20
    END TYPE mytype
21
 
22
  CONTAINS
23
 
24
    SUBROUTINE myfinal (el)
25
      TYPE(mytype) :: el
26
    END SUBROUTINE myfinal
27
 
28
  END SUBROUTINE bar
29
 
30
END MODULE final_type
31
 
32
PROGRAM finalizer
33
  IMPLICIT NONE
34
  ! Do nothing here
35
END PROGRAM finalizer
36
 
37
! { 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.