diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/uninit-C.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/uninit-C.c | 20 |
1 files changed, 20 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..e8ca84eefe3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/uninit-C.c @@ -0,0 +1,20 @@ +/* Spurious uninitialized variable warning, inspired by libgcc2.c. */ +/* { dg-do compile } */ +/* { dg-options "-O -Wuninitialized" } */ + +/* Not all platforms support TImode integers. */ +#if defined(__LP64__) || defined(__sparc__) +typedef int TItype __attribute__ ((mode (TI))); /* { dg-error "no data type for mode" "TI" { target sparc-sun-solaris2.[0-6]* } } */ +#else +typedef long TItype; +#endif + +TItype +__subvdi3 (TItype a, TItype b) +{ + TItype w; + + w = a - b; + + return w; +} |