diff options
author | revitale <revitale@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-28 21:51:53 +0000 |
---|---|---|
committer | revitale <revitale@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-28 21:51:53 +0000 |
commit | 6b835e3ce2d062ae7323a1842c795400ca00437d (patch) | |
tree | fbc2601e3989219775a9593d107a28e213728ed3 /gcc/testsuite/gfortran.dg/sms-1.f90 | |
parent | 21411f945bbd44de727e75bb6bfac33f45abf366 (diff) | |
download | gcc-6b835e3ce2d062ae7323a1842c795400ca00437d.tar.gz |
Avoid SMS when the candidate loop contains INC instruction
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127027 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gfortran.dg/sms-1.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/sms-1.f90 | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/sms-1.f90 b/gcc/testsuite/gfortran.dg/sms-1.f90 new file mode 100644 index 00000000000..f9bfafe9208 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/sms-1.f90 @@ -0,0 +1,28 @@ +! { dg-do run } +! { dg-options "-O2 -fmodulo-sched" } +program main + integer (kind = 8) :: i, l8, u8, step8 + integer (kind = 4) :: l4, step4 + integer (kind = 8), parameter :: big = 10000000000_8 + + u8 = big * 40 + 200 + l4 = 200 + step8 = -big + call test ((/ (i, i = u8, l4, step8) /), u8, l4 + 0_8, step8) +contains + subroutine test (a, l, u, step) + integer (kind = 8), dimension (:), intent (in) :: a + integer (kind = 8), intent (in) :: l, u, step + integer (kind = 8) :: i + integer :: j + + j = 1 + do i = l, u, step + if (a (j) .ne. i) call abort + j = j + 1 + end do + if (size (a, 1) .ne. j - 1) call abort + end subroutine test +end program main + + |