diff --git a/compiler/i386/popt386.pas b/compiler/i386/popt386.pas index 98a61d85d0..a7bbfe0434 100644 --- a/compiler/i386/popt386.pas +++ b/compiler/i386/popt386.pas @@ -726,6 +726,7 @@ begin taicpu(hp1).loadConst(0,taicpu(p).oper[0]^.val and taicpu(hp1).oper[0]^.val); asml.remove(p); p.free; + p:=hp1; end else {change "and x, reg; jxx" to "test x, reg", if reg is deallocated before the