diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 82c9109817f3..dcee989504f6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-05-01 Andrew Pinski + + PR middle-end/31740 + * gcc.c-torture/compile/20070501-1.c: New testcase. + 2007-05-01 Thomas Koenig PR fortran/31732 diff --git a/gcc/testsuite/gcc.c-torture/compile/20070501-1.c b/gcc/testsuite/gcc.c-torture/compile/20070501-1.c new file mode 100644 index 000000000000..39acd49dee45 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20070501-1.c @@ -0,0 +1,16 @@ + typedef signed int signed16 __attribute__ ((__mode__ (__HI__))); + typedef unsigned int unsigned16 __attribute__ ((__mode__ (__HI__))); + typedef signed16 HI; + typedef unsigned16 UHI; +unsigned short f(int y) +{ + HI tmp_b4; + tmp_b4 = y; + UHI opval; + if (tmp_b4 == -32768) + opval = 32767; + else + opval = -tmp_b4; + return opval; +} +