FPC 3.2.4 IE 200510032 x64
FPC 3.2.4, target x64, tested only on Windows
program app;
{$mode objfpc}
uses
unit1;
var
R: TAdvRec;
B: Boolean;
begin
if (test(R) < 1) or B then;
end.
unit unit1;
{$modeswitch advancedrecords}
interface
type
TAdvRec = record
B: Boolean;
class operator := (v1: TAdvRec): NativeInt;
class operator := (v1: Single): TAdvRec;
class operator <(v1, v2: TAdvRec): Boolean;
end;
function test(v1: TAdvRec): TAdvRec;
implementation
function test(v1: TAdvRec): TAdvRec; inline;
begin
if v1.B then raise TObject.Create;
end;
function dummy(v1: TAdvRec): Boolean;
begin
end;
class operator TAdvRec.<(v1, v2: TAdvRec): boolean; inline;
begin
dummy(v1);
end;
class operator TAdvRec.:=(v1: TAdvRec): NativeInt;
begin
end;
class operator TAdvRec.:=(v1: Single): TAdvRec;
begin
end;
end.
Compile:
C:\lazarus324\fpc\3.2.4\bin\x86_64-win64\fpc.exe -OoLEVEL2 -OoDFA app.pas
Result: Error: Internal error 200510032
The sample for work was taken from the forum: link
There were various other errors during the simplification process. But I will test them after solving this one, as I suspect they are related, so as not to do unnecessary work, I will wait until this problem is solved.
Edited by alligator