Debian Codegraph @

gcc/testsuite/c-c++-common/goacc/private-reduction-1.c

raw
1 /* { dg-additional-options "-fopt-info-note-omp" }
2 { dg-additional-options "--param=openacc-privatization=noisy" } for
3 testing/documenting aspects of that functionality. */
4
5 int
6 reduction ()
7 {
8 int i, r;
9
10 #pragma acc parallel
11 #pragma acc loop private (r) reduction (+:r)
12 /* { dg-note {variable 'r' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} r { target *-*-* } .-1 } */
13 /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} i { target *-*-* } .-2 } */
14 for (i = 0; i < 100; i++)
15 r += 10;
16
17 #pragma acc serial
18 #pragma acc loop private (r) reduction (+:r)
19 /* { dg-note {variable 'r' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} r { target *-*-* } .-1 } */
20 /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} i { target *-*-* } .-2 } */
21 for (i = 0; i < 100; i++)
22 r += 10;
23
24 return r;
25 }