mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Testcase for PR2437.
llvm-svn: 64131
This commit is contained in:
parent
3f98669da2
commit
a55da8836c
32
test/FrontendFortran/2009-02-09-FloorDivExpr.f90
Normal file
32
test/FrontendFortran/2009-02-09-FloorDivExpr.f90
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
! RUN: %llvmgcc -c %s
|
||||||
|
! PR2437
|
||||||
|
program main
|
||||||
|
implicit none
|
||||||
|
call build (77)
|
||||||
|
contains
|
||||||
|
subroutine build (order)
|
||||||
|
integer :: order, i, j
|
||||||
|
|
||||||
|
|
||||||
|
call test (1, order, 3, (/ (i, i = 1, order, 3) /))
|
||||||
|
call test (order, 1, -3, (/ (i, i = order, 1, -3) /))
|
||||||
|
|
||||||
|
do j = -10, 10
|
||||||
|
call test (order + j, order, 5, (/ (i, i = order + j, order, 5) /))
|
||||||
|
call test (order + j, order, -5, (/ (i, i = order + j, order, -5) /))
|
||||||
|
end do
|
||||||
|
|
||||||
|
end subroutine build
|
||||||
|
|
||||||
|
subroutine test (from, to, step, values)
|
||||||
|
integer, dimension (:) :: values
|
||||||
|
integer :: from, to, step, last, i
|
||||||
|
|
||||||
|
last = 0
|
||||||
|
do i = from, to, step
|
||||||
|
last = last + 1
|
||||||
|
if (values (last) .ne. i) call abort
|
||||||
|
end do
|
||||||
|
if (size (values, dim = 1) .ne. last) call abort
|
||||||
|
end subroutine test
|
||||||
|
end program main
|
Loading…
x
Reference in New Issue
Block a user