Debian Codegraph @

gcc/testsuite/gfortran.dg/pr120196.f90

raw
1 ! PR libfortran/120196
2 ! { dg-do run }
3
4 program pr120196
5 character(len=:, kind=1), allocatable :: a(:), s
6 character(len=:, kind=4), allocatable :: b(:), t
7 logical, allocatable :: l(:)
8 logical :: m
9 allocate (character(len=16, kind=1) :: a(10), s)
10 allocate (l(10))
11 a(:) = ""
12 s = "*"
13 l = .true.
14 m = .true.
15 if (findloc (a, s, dim=1, back=.true.) .ne. 0) stop 1
16 if (findloc (a, s, mask=l, dim=1, back=.true.) .ne. 0) stop 2
17 if (findloc (a, s, mask=m, dim=1, back=.true.) .ne. 0) stop 3
18 deallocate (a, s)
19 allocate (character(len=16, kind=4) :: b(10), t)
20 b(:) = ""
21 t = "*"
22 if (findloc (b, t, dim=1, back=.true.) .ne. 0) stop 4
23 if (findloc (b, t, mask=l, dim=1, back=.true.) .ne. 0) stop 5
24 if (findloc (b, t, mask=m, dim=1, back=.true.) .ne. 0) stop 6
25 deallocate (b, t, l)
26 end program pr120196