summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/20050702-1.c
blob: ce151d36131a73023213ac962377e81b3870169d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* We going into an infinite loop in fold because we
    were mishandling the return value of 
    fold_to_nonsharp_ineq_using_bound. */
_Bool f();
void g(int);
void h (int old_size)
{
   int new_size = old_size, i;
   g(old_size - 1);
   i = 0;
   while (i < old_size - 1)
   {
     if (f())
     {
       i++;
       continue;
     }
     while (i < old_size - 1)
       i++;
   }
   g(new_size);
}