diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-04-02 08:08:22 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-04-02 08:08:22 +0000 |
commit | fd03fc5d4d51651da4cea79357bd750e88f828d5 (patch) | |
tree | 6f9d0c57a696399a9f82b1e41a0aad581a8490a3 /gcc/testsuite | |
parent | 20e1b360bba1a9ebc19c8ffa35526bf5aae77b23 (diff) | |
download | gcc-fd03fc5d4d51651da4cea79357bd750e88f828d5.tar.gz |
* fold-const.c (fold): Before optimizing unsigned comparison with
0x7fffffffU, make sure arg0 is integral type.
* gcc.c-torture/execute/20010329-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41000 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20010329-1.c | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c6e1eb370ea..61ee72e23fb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2001-04-02 Jakub Jelinek <jakub@redhat.com> + + * gcc.c-torture/execute/20010329-1.c: New test. + 2001-03-28 Loren J. Rittle <ljrittle@acm.org> * g++.old-deja/g++.other/eh4.C: Fix typo. diff --git a/gcc/testsuite/gcc.c-torture/execute/20010329-1.c b/gcc/testsuite/gcc.c-torture/execute/20010329-1.c new file mode 100644 index 00000000000..e28d6d7c72e --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20010329-1.c @@ -0,0 +1,14 @@ +#include <limits.h> + +int main (void) +{ + void *x = ((void *)((unsigned int)INT_MAX + 2)); + void *y = ((void *)((unsigned long)LONG_MAX + 2)); + if (x >= ((void *)((unsigned int)INT_MAX + 1)) + && x <= ((void *)((unsigned int)INT_MAX + 6)) + && y >= ((void *)((unsigned long)LONG_MAX + 1)) + && y <= ((void *)((unsigned long)LONG_MAX + 6))) + exit (0); + else + abort (); +} |