blob: e1501ef66b82e47dea284e7adfd103dada8cd638 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
! { dg-do compile }
! Parsing of finalizer procedure definitions.
! Check that CONTAINS is allowed in TYPE definition; but empty only for F2008
MODULE final_type
IMPLICIT NONE
TYPE :: mytype
INTEGER, ALLOCATABLE :: fooarr(:)
REAL :: foobar
CONTAINS
END TYPE mytype
CONTAINS
SUBROUTINE bar
TYPE :: t
CONTAINS ! This is ok
END TYPE t
! Nothing
END SUBROUTINE bar
END MODULE final_type
PROGRAM finalizer
IMPLICIT NONE
! Do nothing here
END PROGRAM finalizer
! { dg-final { cleanup-modules "final_type" } }
|