2 program char_pointer_func
3 ! Test assignments from character pointer functions, required
4 ! to fix PR17192 and PR17202
5 ! Provided by Paul Thomas pault@gcc.gnu.org
8 character*4, pointer :: c1
9 character*4, pointer :: c2(:)
11 ! Check that we have not broken non-pointer characters.
13 if (c0
/= "abcd") call abort ()
16 if (c1
/= "abcd") call abort ()
18 if (c2(1) /= "abcd") call abort ()
22 if (c1
/= "abcd") call abort ()
24 if (c2(1) /= "abcd") call abort ()
27 function foo () result (cc1
)
31 function sfoo () result (sc1
)
32 character*4, pointer :: sc1
36 function afoo (c0
) result (ac1
)
38 character*4, pointer :: ac1(:)
42 end program char_pointer_func