summaryrefslogtreecommitdiff
path: root/Test/test7/UnreachableBlocks.bpl
diff options
context:
space:
mode:
Diffstat (limited to 'Test/test7/UnreachableBlocks.bpl')
-rw-r--r--Test/test7/UnreachableBlocks.bpl40
1 files changed, 40 insertions, 0 deletions
diff --git a/Test/test7/UnreachableBlocks.bpl b/Test/test7/UnreachableBlocks.bpl
new file mode 100644
index 00000000..6ed287a3
--- /dev/null
+++ b/Test/test7/UnreachableBlocks.bpl
@@ -0,0 +1,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;
+}