Debian Codegraph @

gcc/testsuite/gfortran.dg/proc_ptr_23.f90

raw
1 ! { dg-do run }
2 !
3 ! PR 41106: [F03] Procedure Pointers with CHARACTER results
4 !
5 ! Contributed by Janus Weil <[email protected]>
6
7 character(len=5) :: str
8 procedure(character(len=5)), pointer :: pp
9 pp => abc
10 print *,pp()
11 str = pp()
12 if (str/='abcde') STOP 1
13 contains
14 function abc()
15 character(len=5) :: abc
16 abc = 'abcde'
17 end function abc
18 end
19