PR sanitizer/65280
[official-gcc.git] / gcc / testsuite / gcc.dg / uninit-suppress_2.c
bloba4371ecc22a837d4bb9cdb253420ef94b458137c
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 void bar (int);
5 int gflag;
7 void foo()
9 int v;
10 if (gflag)
11 v = 10;
13 blah(); /* *gflag may be killed, but compiler won't know */
15 if (gflag)
16 bar(v); /* { dg-warning "uninitialized" "should not be promoted to error" } */