Debian Codegraph @

gcc/testsuite/gfortran.dg/pr115348.f90

raw
1 ! { dg-do compile }
2 ! { dg-options "-fcheck=recursion" }
3 !
4 ! Test the fix for pr115348.
5 !
6 ! Contributed by Maxime van den Bossche <[email protected]>
7 !
8 module mymodule
9 implicit none
10
11 type mytype
12 integer :: mynumber
13 contains
14 procedure :: myroutine
15 end type mytype
16
17 contains
18
19 subroutine myroutine(self)
20 class(mytype), intent(out) :: self
21
22 self%mynumber = 1
23 end subroutine myroutine
24 end module mymodule
25
26
27 program myprogram
28 use mymodule, only: mytype
29 implicit none
30
31 type(mytype) :: myobject
32
33 call myobject%myroutine()
34 print *, myobject%mynumber
35 end program myprogram