From 2956f353baff55a44b0cac9807774b47c3f3ab02 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Tue, 28 Jan 2003 01:59:22 +0000 Subject: [PATCH] re PR middle-end/7227 (bogus code generation with attribute mode TI) PR middle-end/7227 * gcc.dg/uninit-C.c: New test. From-SVN: r61941 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/uninit-C.c | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/uninit-C.c 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 + + PR middle-end/7227 + * gcc.dg/uninit-C.c: New test. + 2003-01-27 Nathan Sidwell * 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; +} -- 2.30.2