diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/uninit-F-O0.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/uninit-F-O0.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/uninit-F-O0.c b/gcc/testsuite/gcc.dg/uninit-F-O0.c new file mode 100644 index 000000000..737cc6500 --- /dev/null +++ b/gcc/testsuite/gcc.dg/uninit-F-O0.c @@ -0,0 +1,9 @@ +/* Test we do warn about initializing variable with self in the initialization. */ +/* { dg-do compile } */ +/* { dg-options "-Wuninitialized" } */ + +int f() +{ + int i = i + 1; /* { dg-warning "i" "uninitialized variable warning" } */ + return i; +} |