Debian Codegraph @

gcc/testsuite/gfortran.dg/class_22.f03

raw
1 ! { dg-do compile }
2 !
3 ! PR 44212: [OOP] ICE when defining a pointer component before defining the class and calling a TBP then
4 !
5 ! Contributed by Hans-Werner Boschmann <[email protected]>
6
7 module ice_module
8
9 type :: B_type
10 class(A_type),pointer :: A_comp
11 end type B_type
12
13 type :: A_type
14 contains
15 procedure :: A_proc
16 end type A_type
17
18 contains
19
20 subroutine A_proc(this)
21 class(A_type),target,intent(inout) :: this
22 end subroutine A_proc
23
24 subroutine ice_proc(this)
25 class(A_type) :: this
26 call this%A_proc()
27 end subroutine ice_proc
28
29 end module ice_module