summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/uninit-E.c
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-19 20:12:44 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-19 20:12:44 +0000
commitac9b19aaa4d30842172a28c02ee38ec006d56e56 (patch)
tree346f1ebd450686d1b4790a3e7d867e9291da3711 /gcc/testsuite/gcc.dg/uninit-E.c
parent59729df469b42e2bf8edd05c06b279ef77df0ea1 (diff)
downloadgcc-ac9b19aaa4d30842172a28c02ee38ec006d56e56.tar.gz
*** empty log message ***
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70573 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/uninit-E.c')
-rw-r--r--gcc/testsuite/gcc.dg/uninit-E.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/uninit-E.c b/gcc/testsuite/gcc.dg/uninit-E.c
new file mode 100644
index 00000000000..42b84302f96
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/uninit-E.c
@@ -0,0 +1,9 @@
+/* Test we do warn about initializing variable with self when -Winit-self is supplied. */
+/* { dg-do compile } */
+/* { dg-options "-O -Wuninitialized -Winit-self" } */
+
+int f()
+{
+ int i = i;
+ return i;
+}