summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr36967.f
blob: 4f8589771b8f10fdf0c1025dcb8bf5513dd8799c (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-options "-O2 -fpredictive-commoning" }
      subroutine foo(x,y,n)
      integer n
      real*8 y(n,n,n),x(n,n,n)
      integer k, j, i
      do k = 2, n-1
        do j = 2, n-1
          do I = 2, n-1
            y(i,j,k) = y(i,j,k)
     +        + (x(i-1,j-1,k)
     +           +  x(i,j-1,k-1)
     +           +  x(i,j+1,k-1)
     +           +  x(i,j+1,k+1)
     +           +  x(i+1,j,k+1))
     +        + (x(i-1,j-1,k-1)
     +           +  x(i+1,j-1,k-1)
     +           +  x(i-1,j+1,k-1)
     +           +  x(i+1,j+1,k-1)
     +           +  x(i-1,j+1,k+1)
     +           +  x(i+1,j+1,k+1))
          enddo
        enddo
      enddo
      return
      end