blob: c388be42fc5da89b78dfcbab68408dde612c2d40 (
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
32
33
34
35
36
37
38
39
|
! { dg-do compile }
!
! PR 45827: [4.6 Regression] [OOP] mio_component_ref(): Component not found
!
! Contributed by Daniel Franke <dfranke@gcc.gnu.org>
MODULE m
TYPE, ABSTRACT :: t
PRIVATE
INTEGER :: n
CONTAINS
PROCEDURE :: get
END TYPE
ABSTRACT INTERFACE
SUBROUTINE create(this)
IMPORT t
CLASS(t) :: this
END SUBROUTINE
END INTERFACE
CONTAINS
FUNCTION get(this)
CLASS(t) :: this
REAL, DIMENSION(this%n) :: get
END FUNCTION
SUBROUTINE destroy(this)
CLASS(t) :: this
END SUBROUTINE
END MODULE
PROGRAM p
USE m
END
|