summaryrefslogtreecommitdiff
path: root/Test/test7/UnreachableBlocks.bpl
blob: 6ed287a374762c35e600a247db7cedc98fef51ea (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// In the following program, block "A" has no dominator, which would cause Boogie
// to crash if Boogie didn't first remove unreachable blocks.  That is essentially
// what this test tests
procedure P()
{
entry:
  goto A;
A:
  return;
B:
  goto A;
}

procedure Q()
{
entry:
  goto entry, A;
A:
  return;
}

procedure R()
{
entry:
  return;
A:
  goto A;
}

procedure S()
{
entry:
  return;
A:
  goto C;
B:
  goto C;
C:  // C has no dominator
  return;
}