From ef75736785c9ea83d2f9b01a03aeef0b45501e72 Mon Sep 17 00:00:00 2001 From: "J\"orn Rennecke" Date: Wed, 26 Aug 1998 08:19:18 +0000 Subject: Document overflow bug in check_dbra_loop: * execute/loop-4b.c: New test. From-SVN: r21999 --- gcc/testsuite/gcc.c-torture/ChangeLog | 4 ++++ gcc/testsuite/gcc.c-torture/execute/loop-4b.c | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/execute/loop-4b.c (limited to 'gcc') 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 + + * execute/loop-4b.c: New test. + Mon Aug 24 14:20:32 1998 Nick Clifton * 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); +} -- cgit v1.1