summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2003-01-28 01:59:22 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2003-01-28 01:59:22 +0000
commita4a8d7fbac4dd11ad8ab103a9409535276d213d5 (patch)
tree242aaa6dcc38d7b2e92f4d08e9b4052737569c3c /gcc/testsuite
parent8ce9c71903bb88fb3577351a4bdb92bb10def811 (diff)
downloadgcc-a4a8d7fbac4dd11ad8ab103a9409535276d213d5.tar.gz
PR middle-end/7227
* gcc.dg/uninit-C.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61941 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/uninit-C.c15
2 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c778bcc6ee3..467fcca27f6 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2003-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ PR middle-end/7227
+ * gcc.dg/uninit-C.c: New test.
+
2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
* g++.dg/abi/covariant1.C: New test.
diff --git a/gcc/testsuite/gcc.dg/uninit-C.c b/gcc/testsuite/gcc.dg/uninit-C.c
new file mode 100644
index 00000000000..c81ada4abfc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/uninit-C.c
@@ -0,0 +1,15 @@
+/* Spurious uninitialized variable warning, inspired by libgcc2.c. */
+/* { dg-do compile } */
+/* { dg-options "-O -Wuninitialized" } */
+
+typedef int TItype __attribute__ ((mode (TI)));
+
+TItype
+__subvdi3 (TItype a, TItype b)
+{
+ TItype w;
+
+ w = a - b;
+
+ return w;
+}