re PR middle-end/7227 (bogus code generation with attribute mode TI)
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Tue, 28 Jan 2003 01:59:22 +0000 (01:59 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Tue, 28 Jan 2003 01:59:22 +0000 (01:59 +0000)
PR middle-end/7227
* gcc.dg/uninit-C.c: New test.

From-SVN: r61941

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

index c778bcc6ee315930be50386a98b1285b86c0b03b..467fcca27f663c8e6eb8aa035ac8f3304aa83ef3 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;
+}