diff options
author | davidxl <davidxl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-28 17:41:31 +0000 |
---|---|---|
committer | davidxl <davidxl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-28 17:41:31 +0000 |
commit | a7d4604bc678dd3d354e0bc935550b0e0168ab59 (patch) | |
tree | 371e321349590c66d4a3929d9c841eb7fe2c2cfa /gcc/testsuite/gcc.dg/uninit-pred-7_b.c | |
parent | 913fc649340a7c990e0bccc8481a8f2f23d8573b (diff) | |
download | gcc-a7d4604bc678dd3d354e0bc935550b0e0168ab59.tar.gz |
predicate aware uninitialized analysis
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158835 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/uninit-pred-7_b.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/uninit-pred-7_b.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/uninit-pred-7_b.c b/gcc/testsuite/gcc.dg/uninit-pred-7_b.c new file mode 100644 index 00000000000..338d18c95e3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/uninit-pred-7_b.c @@ -0,0 +1,23 @@ + +/* { dg-do compile } */ +/* { dg-options "-Wuninitialized -O2" } */ + +int g; +void bar(); +void blah(int); + +int foo (int n, int l, int m, int r) +{ + int v; + + if (n > 10) + v = r; + + if (m) g++; + else bar(); + + if (( n > 10) || (l != 100)) + blah (v); /* { dg-warning "uninitialized" "warning" } */ + + return 0; +} |