Document overflow bug in check_dbra_loop:
authorJ"orn Rennecke <amylaar@cygnus.co.uk>
Wed, 26 Aug 1998 08:19:18 +0000 (08:19 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Wed, 26 Aug 1998 08:19:18 +0000 (09:19 +0100)
* execute/loop-4b.c: New test.

From-SVN: r21999

gcc/testsuite/gcc.c-torture/ChangeLog
gcc/testsuite/gcc.c-torture/execute/loop-4b.c [new file with mode: 0644]

index 45598b84cda85b159650aef981820370f2a34e06..b545b609db5ffb538a37db09ee5e8c91a4130383 100644 (file)
@@ -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 (file)
index 0000000..eaf7f30
--- /dev/null
@@ -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);
+}