diff options
Diffstat (limited to 'gcc/testsuite/c-c++-common/uninit-G.c')
-rw-r--r-- | gcc/testsuite/c-c++-common/uninit-G.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/uninit-G.c b/gcc/testsuite/c-c++-common/uninit-G.c new file mode 100644 index 0000000..08f5f53 --- /dev/null +++ b/gcc/testsuite/c-c++-common/uninit-G.c @@ -0,0 +1,9 @@ +/* Test we do not warn about initializing variable with address of self in the initialization. */ +/* { dg-do compile } */ +/* { dg-options "-O -Wuninitialized" } */ + +void *f() +{ + void *i = &i; + return i; +} |