Prefetch on local variables causes internal error when compiling with regvar on
Original Reporter info from Mantis: Nitorami
-
Reporter name:
Original Reporter info from Mantis: Nitorami
- Reporter name:
Description:
The code below generates internal error 200402021 when compiled (in the IDE) with register variables on. Following the error, the IDE remains in an undefined state and would then throw internal error 200309201 on all other attempts to compile something.
This may be rather far fetched; the code is useless, prefetch is pointless, but I decided to report it because the problem does not appear with FPC 2.6.4, and something appears to have broken.
{$optimization regvar on}
procedure test;
var m,n: integer;
begin
for m := 100 downto 0 do begin
prefetch (m);
end;
end;
begin
end.
Steps to reproduce:
Compile in the IDE
Mantis conversion info:
- Mantis ID: 27811
- OS: xp
- OS Build: SP3
- Build: 29.1.2015
- Platform: windows
- Version: 3.1.1
- Fixed in version: 3.0.1
- Fixed in revision: 32665 (#e0ca083c)