diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-09-12 06:49:26 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-09-12 06:49:26 +0000 |
commit | 02846a3de5fde3992fcb95553bf624eeea1e6d40 (patch) | |
tree | ef4d7df0ac902cd3344cc6163ebed2ebb2fd927e /gcc/testsuite | |
parent | c12ebabf2afbb96b8aa3b44ef980e5b2a2b14879 (diff) | |
download | gcc-02846a3de5fde3992fcb95553bf624eeea1e6d40.tar.gz |
* fold-const.c (make_range): Only narrow to signed range if
the signed range is smaller than the unsigned range.
* gcc.c-torture/execute/20020911-1.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57050 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20020911-1.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/20020911-1.c b/gcc/testsuite/gcc.c-torture/execute/20020911-1.c new file mode 100644 index 00000000000..ec8302211c0 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20020911-1.c @@ -0,0 +1,8 @@ +extern void abort (void); +unsigned short c = 0x8000; +int main() +{ + if ((c-0x8000) < 0 || (c-0x8000) > 0x7fff) + abort(); + return 0; +} |