coarray_41.f90: Add "-latomic" option if libatomic_available.
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr36967.f
blob4f8589771b8f10fdf0c1025dcb8bf5513dd8799c
1 ! { dg-options "-O2 -fpredictive-commoning" }
2 subroutine foo(x,y,n)
3 integer n
4 real*8 y(n,n,n),x(n,n,n)
5 integer k, j, i
6 do k = 2, n-1
7 do j = 2, n-1
8 do I = 2, n-1
9 y(i,j,k) = y(i,j,k)
10 + + (x(i-1,j-1,k)
11 + + x(i,j-1,k-1)
12 + + x(i,j+1,k-1)
13 + + x(i,j+1,k+1)
14 + + x(i+1,j,k+1))
15 + + (x(i-1,j-1,k-1)
16 + + x(i+1,j-1,k-1)
17 + + x(i-1,j+1,k-1)
18 + + x(i+1,j+1,k-1)
19 + + x(i-1,j+1,k+1)
20 + + x(i+1,j+1,k+1))
21 enddo
22 enddo
23 enddo
24 return
25 end