diff options
author | qadeer <qadeer@microsoft.com> | 2011-05-04 07:53:49 -0700 |
---|---|---|
committer | qadeer <qadeer@microsoft.com> | 2011-05-04 07:53:49 -0700 |
commit | bd5e622cbaaae712297925c762d1bacce93705ed (patch) | |
tree | c4a9153b47d5549c5adebaf92ae45b83738465c0 /Source/Core/DeadVarElim.cs | |
parent | ca798721a6b6dff5b4948f0650d0292ab8ef3d69 (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.cs | 2 |
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);
}
}
|