Fixed some bugs in register stack pass.
[llvm/zpu.git] / test / FrontendFortran / 2009-02-09-FloorDivExpr.f90
blob870e99bd08660d576f4ca172fb1fbe329974ca7a
1 ! RUN: %llvmgcc -c %s
2 ! PR2437
3 program main
4 implicit none
5 call build (77)
6 contains
7 subroutine build (order)
8 integer :: order, i, j
11 call test (1, order, 3, (/ (i, i = 1, order, 3) /))
12 call test (order, 1, -3, (/ (i, i = order, 1, -3) /))
14 do j = -10, 10
15 call test (order + j, order, 5, (/ (i, i = order + j, order, 5) /))
16 call test (order + j, order, -5, (/ (i, i = order + j, order, -5) /))
17 end do
19 end subroutine build
21 subroutine test (from, to, step, values)
22 integer, dimension (:) :: values
23 integer :: from, to, step, last, i
25 last = 0
26 do i = from, to, step
27 last = last + 1
28 if (values (last) .ne. i) call abort
29 end do
30 if (size (values, dim = 1) .ne. last) call abort
31 end subroutine test
32 end program main