Debian Codegraph @

gcc/testsuite/c-c++-common/goacc/kernels-alias-8.c

raw
1 /* { dg-additional-options "-O2" } */
2 /* { dg-additional-options "-fdump-tree-ealias-all" } */
3
4 typedef __SIZE_TYPE__ size_t;
5 extern void *acc_copyin (void *, size_t);
6
7 void
8 foo (int *a, size_t n)
9 {
10 int *p = (int *)acc_copyin (a, n);
11
12 #pragma acc kernels deviceptr (p) pcopy(a[0:n])
13 {
14 a = 0;
15 *p = 1;
16 }
17 }
18
19 /* Only the omp_data_i related loads should be annotated with cliques.
20 Note ccp can remove one of the omp_data_i loads which is why there
21 is there only one clique base still there. */
22 /* { dg-final { scan-tree-dump-times "clique 1 base 1" 1 "ealias" } } */
23 /* { dg-final { scan-tree-dump-times "(?n)clique 1 base 0" 2 "ealias" } } */
24