* gcc.c-torture/execute/loop-11.c: New.
authorDale Johannesen <dalej@apple.com>
Thu, 10 Jan 2002 09:17:05 +0000 (09:17 +0000)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 10 Jan 2002 09:17:05 +0000 (01:17 -0800)
From-SVN: r48719

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

index 3c7927f78efef369db62f62102857f11f5eec6d1..cbfe8c443a4549669d5b02a94e881abe2e0e9aa2 100644 (file)
@@ -1,3 +1,7 @@
+2002-01-10  Dale Johannesen  <dalej@apple.com>
+
+       * gcc.c-torture/execute/loop-11.c: New.
+
 2002-01-08  Aldy Hernandez  <aldyh@redhat.com>
 
         * gcc.dg/altivec-4.c: Add test for mtvscr, dssall, mfvscr, 
diff --git a/gcc/testsuite/gcc.c-torture/execute/loop-11.c b/gcc/testsuite/gcc.c-torture/execute/loop-11.c
new file mode 100644 (file)
index 0000000..ab240ce
--- /dev/null
@@ -0,0 +1,20 @@
+static int a[199];
+
+static void
+foo ()
+{
+  int i;
+  for (i = 198; i >= 0; i--)
+    a[i] = i;
+}
+
+int
+main ()
+{
+  int i;
+  foo ();
+  for (i = 0; i < 199; i++)
+    if (a[i] != i)
+      abort ();
+  return 0;
+}