diff options
author | Andrew Pinski <andrew_pinski@playstation.sony.com> | 2007-05-01 18:34:32 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2007-05-01 11:34:32 -0700 |
commit | f81af7bdeab1f27757f2daabf01512daf0995b68 (patch) | |
tree | 6c6064bc467db76bbd2a2f5816b3efdbfb0a679b /gcc/testsuite/gcc.c-torture/compile/20070501-1.c | |
parent | 2af6cb38db46df5e403dab55fa32ed4371d468cf (diff) | |
download | gcc-f81af7bdeab1f27757f2daabf01512daf0995b68.zip gcc-f81af7bdeab1f27757f2daabf01512daf0995b68.tar.gz gcc-f81af7bdeab1f27757f2daabf01512daf0995b68.tar.bz2 |
re PR middle-end/31740 (Problem while compiling gcc for mips-elf)
2007-05-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR middle-end/31740
* gcc.c-torture/compile/20070501-1.c: New testcase.
From-SVN: r124337
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/20070501-1.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20070501-1.c | 16 |
1 files changed, 16 insertions, 0 deletions
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 0000000..39acd49 --- /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; +} + |