aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/uninit-C.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/uninit-C.c')
-rw-r--r--gcc/testsuite/gcc.dg/uninit-C.c15
1 files changed, 15 insertions, 0 deletions
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;
+}