1 ! { dg-do run { target vect_simd_clones } }
2 ! { dg-additional-options "-msse2" { target sse2_runtime } }
3 ! { dg-additional-options "-mavx" { target avx_runtime } }
7 integer,parameter :: N
=30
8 integer :: a(0:N
-1), b(0:N
-1)
9 integer :: a_ref(0:N
-1)
11 integer, external :: fib
23 call fib_ref (a_ref
, N
)
26 if (a(i
) .ne
. a_ref(i
)) call abort ()
31 recursive function fib(n
) result(r
)
32 !$omp declare simd(fib) inbranch
38 r
= fib(n
-1) + fib(n
-2)
43 subroutine fib_ref(a_ref
, n
)
44 integer :: n
, a_ref(0:n
-1)
50 a_ref(i
) = a_ref(i
-1) + a_ref(i
-2)
53 end subroutine fib_ref