c++: prvalue of array type [PR111286]
[official-gcc.git] / gcc / testsuite / c-c++-common / gomp / pr70550-1.c
blobd0d2fa53e0374e09141e45b61bfcfbc71e26d27c
1 /* PR middle-end/70550 */
2 /* { dg-do compile } */
3 /* { dg-additional-options "-Wuninitialized" } */
5 #ifdef __SIZEOF_INT128__
6 typedef __int128 T;
7 #else
8 typedef long long T;
9 #endif
11 void bar (T);
12 #pragma omp declare target (bar)
14 void
15 foo (void)
18 int i;
19 #pragma omp target defaultmap(tofrom:scalar) /* { dg-bogus "is used uninitialized" } */
21 i = 26;
22 bar (i);
26 T j;
27 #pragma omp target defaultmap(tofrom:scalar) /* { dg-bogus "is used uninitialized" } */
29 j = 37;
30 bar (j);
34 int i;
35 #pragma omp target /* { dg-bogus "is used uninitialized" } */
37 i = 26;
38 bar (i);
42 T j;
43 #pragma omp target /* { dg-bogus "is used uninitialized" } */
45 j = 37;
46 bar (j);
50 int i;
51 #pragma omp target firstprivate (i) /* { dg-warning "is used uninitialized" } */
53 i = 26;
54 bar (i);
58 T j;
59 #pragma omp target firstprivate (j) /* { dg-warning "is used uninitialized" } */
61 j = 37;
62 bar (j);
66 int i;
67 #pragma omp target private (i) /* { dg-bogus "is used uninitialized" } */
69 i = 26;
70 bar (i);
74 T j;
75 #pragma omp target private (j) /* { dg-bogus "is used uninitialized" } */
77 j = 37;
78 bar (j);