2 ! { dg-options "-std=legacy" }
4 program char_pointer_dummy
\r
5 ! Test character pointer dummy arguments, required
\r
6 ! to fix PR16939 and PR18689
\r
7 ! Provided by Paul Thomas pault@gcc.gnu.org
\r
10 character*4, pointer :: c1
\r
11 character*4, pointer :: c2(:)
\r
12 allocate (c1, c2(1))
\r
13 ! Check that we have not broken non-pointer characters.
\r
23 subroutine foo (cc1)
\r
25 if (cc1 /= "wxyz") call abort ()
\r
27 subroutine sfoo (sc1)
\r
28 character*4, pointer :: sc1
\r
29 if (sc1 /= "wxyz") call abort ()
\r
31 subroutine afoo (ac1)
\r
32 character*4, pointer :: ac1(:)
\r
33 if (ac1(1) /= "wxyz") call abort ()
\r
35 end program char_pointer_dummy