aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/uninit-D.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/uninit-D.c')
-rw-r--r--gcc/testsuite/gcc.dg/uninit-D.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/uninit-D.c b/gcc/testsuite/gcc.dg/uninit-D.c
new file mode 100644
index 00000000000..ea957e49e98
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/uninit-D.c
@@ -0,0 +1,9 @@
+/* Test we do not warn about initializing variable with self. */
+/* { dg-do compile } */
+/* { dg-options "-O -Wuninitialized" } */
+
+int f()
+{
+ int i = i;
+ return i;
+}