2009-10-05 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / proc_ptr_23.f90
blobee947122f2b2fae241e31da71fdfefbb8c5f64ff
1 ! { dg-do run }
3 ! PR 41106: [F03] Procedure Pointers with CHARACTER results
5 ! Contributed by Janus Weil <janus@gcc.gnu.org>
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') call abort()
13 contains
14 function abc()
15 character(len=5) :: abc
16 abc = 'abcde'
17 end function abc
18 end