aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/doloop-2.c
diff options
context:
space:
mode:
author(no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-08 20:22:32 +0000
committer(no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-08 20:22:32 +0000
commitc257e4c69fa5749f65d4348aa34cf2b1dd888bbb (patch)
tree7878a3c9dbdf10b66a75b7e495d5a887cce31de8 /gcc/testsuite/gcc.dg/doloop-2.c
parentb88baab8dc533a28fc64d5addedc490222540398 (diff)
This commit was manufactured by cvs2svn to create tagimmuse-rewrite-start
'immuse-rewrite-start'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/tags/immuse-rewrite-start@88792 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/doloop-2.c')
-rw-r--r--gcc/testsuite/gcc.dg/doloop-2.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/doloop-2.c b/gcc/testsuite/gcc.dg/doloop-2.c
new file mode 100644
index 00000000000..115ec742ba3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/doloop-2.c
@@ -0,0 +1,19 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+extern void abort (void);
+unsigned global_iters;
+
+void bi_reverse(int len)
+{
+ do {
+ global_iters++;
+ } while (--len > 0);
+}
+
+int main()
+{
+ bi_reverse(5);
+ if (global_iters != 5)
+ abort ();
+ return 0;
+}