aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/uninit-G.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/uninit-G.c')
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/uninit-G.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/uninit-G.c b/gcc-4.9/gcc/testsuite/c-c++-common/uninit-G.c
new file mode 100644
index 000000000..08f5f5321
--- /dev/null
+++ b/gcc-4.9/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;
+}