Debian Codegraph @

gcc/testsuite/gfortran.dg/proc_ptr_45.f90

raw
1 ! { dg-do compile }
2 !
3 ! PR fortran/49397
4 !
5 ! Valid per IR F08/0060 and F2008Corr2, C729
6 !
7 Program m5
8 Print *,f()
9 Contains
10 Subroutine s
11 Procedure(Real),Pointer :: p
12 Print *,g()
13 p => f ! (1)
14 Print *,p()
15 p => g ! (2)
16 Print *,p()
17 End Subroutine
18 End Program
19 Function f()
20 f = 1
21 End Function
22 Function g()
23 g = 2
24 End Function