diff options
author | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-04-05 02:27:47 +0000 |
---|---|---|
committer | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-04-05 02:27:47 +0000 |
commit | 194d4e232df38645d9f6e3477d76c99fa9857f98 (patch) | |
tree | 102c5ecab55ff14b05898ff73ce3c22e9dd1cd40 /gcc/testsuite | |
parent | b7020468e1444096c922207d24cf353f749a58bc (diff) | |
download | gcc-194d4e232df38645d9f6e3477d76c99fa9857f98.tar.gz |
2001-04-04 Diego Novillo <dnovillo@redhat.com>
* simplify-rtx.c (simplify_binary_operation): Check for overflow
when folding integer division and modulo operations.
2001-04-04 Diego Novillo <dnovillo@redhat.com>
* gcc.c-torture/compile/20010404-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41105 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/compile/20010404-1.c | 15 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 225f9280257..5e4c1552010 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2001-04-04 Diego Novillo <dnovillo@redhat.com> + + * gcc.c-torture/compile/20010404-1.c: New test. + 2001-04-04 Jakub Jelinek <jakub@redhat.com> * gcc.c-torture/compile/20010326-1.c: New test. diff --git a/gcc/testsuite/gcc.c-torture/compile/20010404-1.c b/gcc/testsuite/gcc.c-torture/compile/20010404-1.c new file mode 100644 index 00000000000..f890118e15d --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20010404-1.c @@ -0,0 +1,15 @@ +/* This testcase caused a floating point exception in the compiler when + compiled with -O2. The crash occurs when trying to simplify division + and modulo operations. */ + +#include <limits.h> + +extern void bar (int); + +void foo () +{ + int a = INT_MIN; + int b = -1; + bar (a / b); + bar (a % b); +} |