summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/20030125-1.c
blob: 656304e2d67b10c0354013dd6de027bf6c6ce850 (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
 int count;

 int func(int *valp) {
   int val, locked = 0;

   while ((val = *valp) != 0) {
     if (count) {
       if (count)
         locked = 1;
       else
         locked = 1;

     if (!locked)
       continue;
     }

     if (!count)
       count--;

     break;
   }

   return val;
 }