2 ! { dg-options "-fno-inline" }
4 ! { dg-additional-options "-fopt-info-all-omp" }
5 ! { dg-additional-options "-foffload=-fopt-info-all-omp" }
7 ! { dg-additional-options "--param=openacc-privatization=noisy" }
8 ! { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
9 ! Prune a few: uninteresting, and potentially varying depending on GCC configuration (data types):
10 ! { dg-prune-output {note: variable 'D\.[0-9]+' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} }
13 recursive function fact (x
)
15 integer, intent(in
) :: x
19 integer, parameter :: n
= 10
22 !$acc loop ! { dg-line l_loop1 }
23 ! { dg-note {variable 'i' in 'private' clause is candidate for adjusting OpenACC privatization level} {} { target *-*-* } l_loop1 }
24 ! { dg-note {variable 'i' ought to be adjusted for OpenACC privatization level: 'vector'} {} { target *-*-* } l_loop1 }
25 ! { dg-note {variable 'i' adjusted for OpenACC privatization level: 'vector'} {} { target { ! openacc_host_selected } } l_loop1 }
26 ! { dg-note {variable 'i\.[0-9]+' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} {} { target *-*-* } l_loop1 }
27 ! { dg-optimized {assigned OpenACC gang vector loop parallelism} {} { target *-*-* } l_loop1 }
29 a(i
) = fact (i
) ! { dg-optimized {assigned OpenACC seq loop parallelism} }
33 if (a(i
) .ne
. fact(i
)) STOP 1
36 recursive function fact (x
) result (res
)
38 integer, intent(in
) :: x
43 res
= x
* fact (x
- 1) ! { dg-optimized {assigned OpenACC seq loop parallelism} }