1 ! Check offloaded function's attributes and classification for OpenACC
4 ! { dg-additional-options "-O2" }
5 ! { dg-additional-options "-fdump-tree-ompexp" }
6 ! { dg-additional-options "-fdump-tree-parloops1-all" }
7 ! { dg-additional-options "-fdump-tree-oaccdevlow" }
11 integer, parameter :: n = 1024
12 integer, dimension (0:n-1) :: a, b, c
17 !$acc kernels copyin (a(0:n-1), b(0:n-1)) copyout (c(0:n-1))
24 ! Check the offloaded function's attributes.
25 ! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc kernels, omp target entrypoint\\)\\)" 1 "ompexp" } }
27 ! Check that exactly one OpenACC kernels construct is analyzed, and that it
28 ! can be parallelized.
29 ! { dg-final { scan-tree-dump-times "SUCCESS: may be parallelized" 1 "parloops1" } }
30 ! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc kernels parallelized, oacc function \\(, , \\), oacc kernels, omp target entrypoint\\)\\)" 1 "parloops1" } }
31 ! { dg-final { scan-tree-dump-not "FAILED:" "parloops1" } }
33 ! Check the offloaded function's classification and compute dimensions (will
34 ! always be 1 x 1 x 1 for non-offloading compilation).
35 ! { dg-final { scan-tree-dump-times "(?n)Function is parallelized OpenACC kernels offload" 1 "oaccdevlow" } }
36 ! { dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccdevlow" } }
37 ! { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc function \\(1, 1, 1\\), oacc kernels parallelized, oacc function \\(, , \\), oacc kernels, omp target entrypoint\\)\\)" 1 "oaccdevlow" } }