1 /* { dg-do compile } */
2 /* { dg-options "-fno-tree-ccp -fno-tree-vrp -O2 -Wuninitialized -Werror=uninitialized -Wno-error=maybe-uninitialized" } */
3 void blah();
4 int gflag;
5 
foo()6 void foo()
7 {
8    int v;
9    if (gflag)
10      v = 10;
11 
12    blah(); /* *gflag may be killed, but compiler won't know */
13 
14    if (gflag)
15     bar(v);   /* { dg-warning "uninitialized" "should not be promoted to error" } */
16 }
17