Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / uninit-18.c
blob223983e107e088605671f7ebabe91066a6a7dc39
1 /* { dg-do compile } */
2 /* { dg-options "-O -Wuninitialized" } */
4 char *foo(int bar, char *baz)
6 char *tmp;
8 if (bar & 3)
9 tmp = baz;
11 switch (bar) {
12 case 1:
13 tmp[5] = 7; /* { dg-bogus "may be used uninitialized" } */
14 break;
15 case 2:
16 tmp[11] = 15; /* { dg-bogus "may be used uninitialized" } */
17 break;
18 default:
19 tmp = 0;
20 break;
23 return tmp; /* { dg-bogus "may be used uninitialized" } */