]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/pr91195.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / pr91195.c
CommitLineData
06e8db10
JJ
1/* PR middle-end/91195 */
2/* { dg-do compile } */
3/* { dg-options "-Wmaybe-uninitialized -O2" } */
4
5int bar (char*);
6
7void
8foo (char *x, char *y)
9{
10 char *a[2];
11 int b = 0;
12
13 if (x)
14 a[b++] = x; /* { dg-bogus "may be used uninitialized in this function" } */
15 if (y)
16 a[b++] = y;
17
18 for (int j = 0; j < 4; j++)
19 switch (j)
20 {
21 case 0:
22 if (b == 0 || bar (a[0]))
23 break;
24 }
25}