diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/uninit-B-2.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gcc.dg/uninit-B-2.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/uninit-B-2.c b/gcc-4.9/gcc/testsuite/gcc.dg/uninit-B-2.c new file mode 100644 index 000000000..ee8a88581 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gcc.dg/uninit-B-2.c @@ -0,0 +1,16 @@ +/* Origin: PR c/179 inverse of uninit-B-O0.c, we should not warn. */ +/* { dg-do compile } */ +/* { dg-options "-O2 -Wuninitialized" } */ +extern void foo (int *); +extern void bar (int); + +void +baz (void) +{ + int i; + foo (&i); /* { dg-bogus "is used uninitialized" "uninit i warning" } */ + if (i) + bar (i); +} + + |