111
|
1 /* PR middle-end/70550 */
|
|
2 /* { dg-do compile } */
|
|
3 /* { dg-additional-options "-Wuninitialized" } */
|
|
4
|
|
5 void bar (int);
|
|
6
|
|
7 void
|
|
8 foo (void)
|
|
9 {
|
|
10 int i, j, k, l, m, n, o, p, q;
|
|
11 #pragma omp task /* { dg-bogus "is used uninitialized in this function" } */
|
|
12 {
|
|
13 i = 2;
|
|
14 bar (i);
|
|
15 }
|
|
16 #pragma omp taskloop /* { dg-bogus "is used uninitialized in this function" } */
|
|
17 for (j = 0; j < 10; j++)
|
|
18 {
|
|
19 k = 7;
|
|
20 bar (k);
|
|
21 }
|
|
22 #pragma omp task firstprivate (l) /* { dg-warning "is used uninitialized in this function" } */
|
|
23 {
|
|
24 l = 2;
|
|
25 bar (l);
|
|
26 }
|
|
27 #pragma omp taskloop firstprivate (m) /* { dg-warning "is used uninitialized in this function" } */
|
|
28 for (j = 0; j < 10; j++)
|
|
29 {
|
|
30 m = 7;
|
|
31 bar (m);
|
|
32 }
|
|
33 #pragma omp task shared (n) /* { dg-bogus "is used uninitialized in this function" } */
|
|
34 {
|
|
35 n = 2;
|
|
36 bar (n);
|
|
37 }
|
|
38 #pragma omp taskloop shared (o) /* { dg-bogus "is used uninitialized in this function" } */
|
|
39 for (j = 0; j < 10; j++)
|
|
40 {
|
|
41 o = 7;
|
|
42 bar (o);
|
|
43 }
|
|
44 #pragma omp task private (p) /* { dg-bogus "is used uninitialized in this function" } */
|
|
45 {
|
|
46 p = 2;
|
|
47 bar (p);
|
|
48 }
|
|
49 #pragma omp taskloop shared (q) /* { dg-bogus "is used uninitialized in this function" } */
|
|
50 for (j = 0; j < 10; j++)
|
|
51 {
|
|
52 q = 7;
|
|
53 bar (q);
|
|
54 }
|
|
55 }
|