* gcc.dg/doloop-2.c: New test.
From-SVN: r88751
This commit is contained in:
parent
a252f3e84f
commit
c054bc3d7a
@ -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.
|
||||
|
19
gcc/testsuite/gcc.dg/doloop-2.c
Normal file
19
gcc/testsuite/gcc.dg/doloop-2.c
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user