Skip to content

Commit 587a359

Browse files
committed
Fix #1873: Clear ILRange in CopyPropagation
We are copying an expression from far away, reusing the ILRange would result in incorrect sequence points.
1 parent 02d9dc3 commit 587a359

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ICSharpCode.Decompiler/IL/Transforms/CopyPropagation.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ static void DoPropagate(ILVariable v, ILInstruction copiedExpr, Block block, ref
165165
{
166166
clone.Children[j].ReplaceWith(new LdLoc(uninlinedArgs[j]));
167167
}
168+
// We are copying an expression from far away, reusing the ILRange would result in incorrect sequence points.
169+
clone.SetILRange(new Interval());
168170
expr.ReplaceWith(clone);
169171
}
170172
block.Instructions.RemoveAt(i);

0 commit comments

Comments
 (0)