[llvm-commits] [llvm] r64131 - /llvm/trunk/test/FrontendFortran/2009-02-09-FloorDivExpr.f90
Duncan Sands
baldrick at free.fr
Mon Feb 9 01:41:50 PST 2009
Author: baldrick
Date: Mon Feb 9 03:41:49 2009
New Revision: 64131
URL: http://llvm.org/viewvc/llvm-project?rev=64131&view=rev
Log:
Testcase for PR2437.
Added:
llvm/trunk/test/FrontendFortran/2009-02-09-FloorDivExpr.f90
Added: llvm/trunk/test/FrontendFortran/2009-02-09-FloorDivExpr.f90
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendFortran/2009-02-09-FloorDivExpr.f90?rev=64131&view=auto
==============================================================================
--- llvm/trunk/test/FrontendFortran/2009-02-09-FloorDivExpr.f90 (added)
+++ llvm/trunk/test/FrontendFortran/2009-02-09-FloorDivExpr.f90 Mon Feb 9 03:41:49 2009
@@ -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
More information about the llvm-commits
mailing list