* gcc.dg/doloop-2.c: New test.

From-SVN: r88751
This commit is contained in:
Michael Matz 2004-10-08 13:11:31 +00:00 committed by Michael Matz
parent a252f3e84f
commit c054bc3d7a
2 changed files with 23 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2004-10-08 Michael Matz <matz@suse.de>
* gcc.dg/doloop-2.c: New test.
2004-10-08 Joseph S. Myers <jsm@polyomino.org.uk>
* gcc.dg/assign-warn-1.c, gcc.dg/assign-warn-2.c: New tests.

View File

@ -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;
}