aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr101158.f90
blob: 9a4d9a2d7aecf8c2f1c1f96adc7a6c19f716e4af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
! { dg-do compile }
! { dg-options "-O1 -ftree-slp-vectorize -fwrapv" }
! { dg-additional-options "-march=armv8-a+sve" { target aarch64-*-* } }

subroutine sprpl5 (left)
  implicit none

  integer :: left
  integer :: avail1, avail2, delx1, delx2, i2, ic

  ic = left
  delx1 = ic / 2
  delx2 = delx1 + 1
  i2 = ic + delx2
  avail1 = i2
  avail2 = 1

  do delx1 = 1, 2
     ic = left + nint (real (left) / 2)
     if (ic .ge. avail1) avail1 = ic + 1

     i2 = ic + delx2
     if (i2 .le. avail2) avail2 = i2 + 1
  end do
end subroutine sprpl5