annotate gcc/testsuite/gfortran.dg/proc_ptr_23.f90 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do run }
kono
parents:
diff changeset
2 !
kono
parents:
diff changeset
3 ! PR 41106: [F03] Procedure Pointers with CHARACTER results
kono
parents:
diff changeset
4 !
kono
parents:
diff changeset
5 ! Contributed by Janus Weil <janus@gcc.gnu.org>
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 character(len=5) :: str
kono
parents:
diff changeset
8 procedure(character(len=5)), pointer :: pp
kono
parents:
diff changeset
9 pp => abc
kono
parents:
diff changeset
10 print *,pp()
kono
parents:
diff changeset
11 str = pp()
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
12 if (str/='abcde') STOP 1
111
kono
parents:
diff changeset
13 contains
kono
parents:
diff changeset
14 function abc()
kono
parents:
diff changeset
15 character(len=5) :: abc
kono
parents:
diff changeset
16 abc = 'abcde'
kono
parents:
diff changeset
17 end function abc
kono
parents:
diff changeset
18 end
kono
parents:
diff changeset
19