Debian Codegraph @

gcc/testsuite/c-c++-common/goacc/uninit-if-clause.c

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options "-Wuninitialized" } */
3
4 #include <stdbool.h>
5
6 int
7 main (void)
8 {
9 int l, l2, ls, l3, l4;
10 /* { dg-note {'l' was declared here} {} { target *-*-* } .-1 } */
11 /* { dg-note {'l2' was declared here} {} { target *-*-* } .-2 } */
12 /* { dg-note {'ls' was declared here} {} { target *-*-* } .-3 } */
13 /* { dg-note {'l3' was declared here} {} { target *-*-* } .-4 } */
14 /* { dg-note {'l4' was declared here} {} { target *-*-* } .-5 } */
15 bool b, b2, bs, b3, b4;
16 /* { dg-note {'b' was declared here} {} { target *-*-* } .-1 } */
17 /* { dg-note {'b2' was declared here} {} { target *-*-* } .-2 } */
18 /* { dg-note {'bs' was declared here} {} { target *-*-* } .-3 } */
19 /* { dg-note {'b3' was declared here} {} { target *-*-* } .-4 } */
20 /* { dg-note {'b4' was declared here} {} { target *-*-* } .-5 } */
21 int i, i2;
22
23 #pragma acc parallel if(l) /* { dg-warning "is used uninitialized" } */
24 ;
25
26 #pragma acc parallel if(b) /* { dg-warning "is used uninitialized" } */
27 ;
28
29 #pragma acc kernels if(l2) /* { dg-warning "is used uninitialized" } */
30 ;
31
32 #pragma acc kernels if(b2) /* { dg-warning "is used uninitialized" } */
33 ;
34
35 #pragma acc serial if(ls) /* { dg-warning "is used uninitialized" } */
36 ;
37
38 #pragma acc serial if(bs) /* { dg-warning "is used uninitialized" } */
39 ;
40
41 #pragma acc data if(l3) /* { dg-warning "is used uninitialized" } */
42 ;
43
44 #pragma acc data if(b3) /* { dg-warning "is used uninitialized" } */
45 ;
46
47 #pragma acc update if(l4) self(i) /* { dg-warning "is used uninitialized" } */
48 ;
49
50 #pragma acc update if(b4) self(i2) /* { dg-warning "is used uninitialized" } */
51 ;
52
53 }