1! { dg-options "-O2 -fgraphite-identity -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine" }
2
3MODULE beta_gamma_psi
4  INTEGER, PARAMETER :: dp=KIND(0.0D0)
5CONTAINS
6  FUNCTION basym (a, b, lambda, eps) RESULT(fn_val)
7    REAL(dp) :: a0(21), b0(21), bsum, c(21), d(21), dsum, &
8         j0, j1, r, r0, r1, s, sum, t, t0, t1, &
9         u, w, w0, z, z0, z2, zn, znm1
10    DO n = 2, num, 2
11       DO i = n, np1
12          b0(1) = r*a0(1)
13          DO m = 2, i
14             bsum = 0.0e0_dp
15             mm1 = m - 1
16             DO j = 1, mm1
17                mmj = m - j
18                bsum = bsum + (j*r - mmj)*a0(j)*b0(mmj)
19             END DO
20             b0(m) = r*a0(m) + bsum/m
21          END DO
22          c(i) = b0(i)/(i + 1.0e0_dp)
23          d(i) = -(dsum + c(i))
24       END DO
25       t0 = d(n)*w*j0
26       sum = sum + (t0 + t1)
27    END DO
28    fn_val = e0*t*u*sum
29  END FUNCTION basym
30END MODULE beta_gamma_psi
31