PR middle-end/7227
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Jan 2003 01:59:22 +0000 (01:59 +0000)
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Jan 2003 01:59:22 +0000 (01:59 +0000)
* gcc.dg/uninit-C.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61941 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/uninit-C.c [new file with mode: 0644]

index c778bcc..467fcca 100644 (file)
@@ -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 (file)
index 0000000..c81ada4
--- /dev/null
@@ -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;
+}