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 extern unsigned int *__restrict a
;
12 extern unsigned int *__restrict b
;
13 extern unsigned int *__restrict c
;
17 #pragma acc kernels copyin (a[0:N], b[0:N]) copyout (c[0:N])
18 for (unsigned int i
= 0; i
< N
; i
++)
22 /* Check the offloaded function's attributes.
23 { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc kernels, omp target entrypoint\\)\\)" 1 "ompexp" } } */
25 /* Check that exactly one OpenACC kernels construct is analyzed, and that it
27 { dg-final { scan-tree-dump-times "SUCCESS: may be parallelized" 1 "parloops1" } }
28 { dg-final { scan-tree-dump-times "(?n)__attribute__\\(\\(oacc kernels parallelized, oacc function \\(, , \\), oacc kernels, omp target entrypoint\\)\\)" 1 "parloops1" } }
29 { dg-final { scan-tree-dump-not "FAILED:" "parloops1" } } */
31 /* Check the offloaded function's classification and compute dimensions (will
32 always be 1 x 1 x 1 for non-offloading compilation).
33 { dg-final { scan-tree-dump-times "(?n)Function is parallelized OpenACC kernels offload" 1 "oaccdevlow" } }
34 { dg-final { scan-tree-dump-times "(?n)Compute dimensions \\\[1, 1, 1\\\]" 1 "oaccdevlow" } }
35 { 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" } } */