summaryrefslogtreecommitdiff
path: root/Source/Core/DeadVarElim.cs
diff options
context:
space:
mode:
authorGravatar qadeer <qadeer@microsoft.com>2011-05-04 07:53:49 -0700
committerGravatar qadeer <qadeer@microsoft.com>2011-05-04 07:53:49 -0700
commitbd5e622cbaaae712297925c762d1bacce93705ed (patch)
treec4a9153b47d5549c5adebaf92ae45b83738465c0 /Source/Core/DeadVarElim.cs
parentca798721a6b6dff5b4948f0650d0292ab8ef3d69 (diff)
fixed a bug in block coalescer. previously, an unreachable block could have as a target a block that was coalesced. this caused a contract to fail downstream (under checked build). in the new behavior, the new blocks after coalescing only contain reachable blocks.
Diffstat (limited to 'Source/Core/DeadVarElim.cs')
-rw-r--r--Source/Core/DeadVarElim.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/DeadVarElim.cs b/Source/Core/DeadVarElim.cs
index c1270eab..3c2b9a42 100644
--- a/Source/Core/DeadVarElim.cs
+++ b/Source/Core/DeadVarElim.cs
@@ -332,7 +332,7 @@ namespace Microsoft.Boogie {
List<Block/*!*/> newBlocks = new List<Block/*!*/>();
foreach (Block/*!*/ b in impl.Blocks) {
Contract.Assert(b != null);
- if (!removedBlocks.Contains(b)) {
+ if (visitedBlocks.Contains(b) && !removedBlocks.Contains(b)) {
newBlocks.Add(b);
}
}