summaryrefslogtreecommitdiff
path: root/tests/sources/0508_loop_init.c
blob: f0817e59f911fb4bac25420ccaeb4521f3748da5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
int init;
int x;

init = 0;
while (rand(0,1)==0) {
  if (init == 0) {
    x = 0;
    init = 1;
  }
  else {
    x = x + 1;
  }
  assert(x >= 0);
}