lto: Remove random_seed from section name.
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr97272.f90
blobe81903860ead1eb04252f9f7393a020b3b36363f
1 ! { dg-do run }
2 ! PR fortran/97272 - Wrong answer from MAXLOC with character arg
4 program test
5 implicit none
6 integer :: i, j, k, l = 10
7 character, allocatable :: a(:)
8 allocate (a(l))
9 a(:) = 'a'
10 l = l - 1
11 a(l) = 'b'
12 i = maxloc (a, dim=1)
13 j = maxloc (a, dim=1, kind=2)
14 k = maxloc (a, dim=1, kind=8, back=.true.)
15 ! print *, 'i = ', i, 'a(i) = ', a(i)
16 ! print *, 'j = ', j, 'a(j) = ', a(j)
17 ! print *, 'k = ', k, 'a(k) = ', a(k)
18 if (i /= l .or. j /= l .or. k /= l) stop 1
19 end