Debian Codegraph @

gcc/testsuite/c-c++-common/goacc/acc-icf.c

raw
1 /* Ensure that IPA-ICF is disabled on OpenACC routines. */
2
3 /* { dg-additional-options "-fopenacc -O2 -fdump-ipa-icf" } */
4
5 /* { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
6 aspects of that functionality. */
7
8 #pragma acc routine gang
9 /* { dg-bogus "warning: region is worker partitioned but does not contain worker partitioned code" "TODO default 'gang' 'vector'" { xfail *-*-* } .+3 }
10 TODO It's the compiler's own decision to not use 'worker' parallelism here, so it doesn't make sense to bother the user about it. */
11 int
12 routine1 (int n)
13 {
14 int i;
15
16 #pragma acc loop
17 for (i = 0; i < n; i++)
18 ;
19
20 return n + 1;
21 }
22
23 #pragma acc routine gang
24 /* { dg-bogus "warning: region is worker partitioned but does not contain worker partitioned code" "TODO default 'gang' 'vector'" { xfail *-*-* } .+3 }
25 TODO It's the compiler's own decision to not use 'worker' parallelism here, so it doesn't make sense to bother the user about it. */
26 int
27 routine2 (int n)
28 {
29 int i;
30
31 #pragma acc loop
32 for (i = 0; i < n; i++)
33 ;
34
35 return n + 1;
36 }
37
38 int
39 main ()
40 {
41 int i;
42
43 #pragma acc parallel loop
44 for (i = 0; i < 8; i++)
45 ;
46
47 #pragma acc parallel loop
48 for (i = 0; i < 8; i++)
49 ;
50
51 return 0;
52 }
53
54 /* { dg-final { scan-ipa-dump-times "with total: 1 items" 5 "icf" } } */