Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gfortran.fortran-torture / execute / pr57396.f90
blob8be01c982084d2383fbfffa84aa2ada33261877c
1 module testmod
2 implicit none
4 contains
6 subroutine foo(n)
7 integer, intent(in) :: n
8 real :: r(0:n,-n:n), a(0:n,-n:n), dj
9 integer :: k, j
11 ! initialize with some dummy values
12 do j = -n, n
13 a(:, j) = j
14 r(:,j) = j + 1
15 end do
17 ! here be dragons
18 do k = 0, n
19 dj = r(k, k - 2) * a(k, k - 2)
20 r(k,k) = a(k, k - 1) * dj
21 enddo
23 if (r(0,0) .ne. -2.) STOP 1
25 end subroutine
27 end module
29 program test
30 use testmod
31 implicit none
32 call foo(5)
33 end program