fpc code
public text v1 · immutableprogram fpc_testing;
var i, min, max : longint;
begin
min := 1;
max := 10;
for i := min to max do
if i = 5 then i := 6; // Error: Illegal assignment to for-loop variable "i" with -Sgh but not -Sgho
i := min;
while i <= max do
begin
if i = 5 then i := 6;
i := i + 1 ;
end;
i := min;
repeat
if i = 5 then i := 6;
i := i + 1;
until i > max;
end.