Yes, its a dead end fight. I have reported it before, actually I think I was the one that initiated it.
I am willing to bet that if this bug gets fixed, it will fix many other issues with doing such coding in other
states when it comes to type switching by the compiler.
Also note this;;
Var
W,I:Word;
begin
W:= 0;
For I := 0 To W-1 do Caption := IntTostr(I);
Also works in Delphi! it does not generate a dead loop, it simply Substracts 1 from 0 which gives you the $FFFF and the loop does the 0..65535 as it should .. Fpc treats it as a integer and generates no loop and reports an overflow.
I hope my point gets across about the issues here.