Fix ICE in substring-handling building 502.gcc_r (PR 87562)
[official-gcc.git] / gcc / testsuite / gcc.dg / uninit-pr19430-2.c
blob9617efc23f252da66fc1ce5d1329ac412fdc0e4c
1 /* { dg-do compile } */
2 /* { dg-options "-O -Wuninitialized" } */
4 int *p, *q;
6 int foo (int b)
8 int i, j = 0;
9 int *x;
10 p = &i;
11 q = &j;
12 if (b)
13 x = p; /* { dg-warning "i. may be used uninitialized" } */
14 else
15 x = q;
16 return *x;