aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJ"orn Rennecke <amylaar@cygnus.co.uk>1998-08-26 08:19:18 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>1998-08-26 09:19:18 +0100
commitef75736785c9ea83d2f9b01a03aeef0b45501e72 (patch)
tree7441e2a044c8645046e22f50267686fddb04fc87 /gcc
parent1379191a201e54a0592dd41f9e188b294f5a42a2 (diff)
downloadgcc-ef75736785c9ea83d2f9b01a03aeef0b45501e72.zip
gcc-ef75736785c9ea83d2f9b01a03aeef0b45501e72.tar.gz
gcc-ef75736785c9ea83d2f9b01a03aeef0b45501e72.tar.bz2
Document overflow bug in check_dbra_loop:
* execute/loop-4b.c: New test. From-SVN: r21999
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.c-torture/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/loop-4b.c21
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/ChangeLog b/gcc/testsuite/gcc.c-torture/ChangeLog
index 45598b8..b545b60 100644
--- a/gcc/testsuite/gcc.c-torture/ChangeLog
+++ b/gcc/testsuite/gcc.c-torture/ChangeLog
@@ -1,3 +1,7 @@
+Wed Aug 26 16:10:00 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * execute/loop-4b.c: New test.
+
Mon Aug 24 14:20:32 1998 Nick Clifton <nickc@cygnus.com>
* execute/bcp-1.c (main): Fix optimize test loop to count number
diff --git a/gcc/testsuite/gcc.c-torture/execute/loop-4b.c b/gcc/testsuite/gcc.c-torture/execute/loop-4b.c
new file mode 100644
index 0000000..eaf7f30
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/loop-4b.c
@@ -0,0 +1,21 @@
+int
+f()
+{
+ int j = 1;
+ long i;
+ i = 0x60000000L;
+ do
+ {
+ j <<= 1;
+ i += 0x10000000L;
+ } while (i < -0x60000000L);
+ return j;
+}
+
+int
+main ()
+{
+ if (f () != 2)
+ abort ();
+ exit (0);
+}