Skip to content

Internal Error 200502052

Summary

Compilation with -Cg on Linux x86_64 throws internal error with 32 and 64bit integer variables (DWord, QWord, Integer, Int64) when -O2 or -O3 or -O4 is used. The same code compiles normally for other platforms (win32 i386, win64 x86_64, linux aarch64).

System Information

Linux, x86_64, FPC trunk, crosscompile for other platforms

Steps to reproduce

fpc -Cg -O3 test.pas

Example Project

program test;
var
  A, B, C: DWord;

procedure SomeProcedure;
begin
  if A > B then C := A
  else C := B;
  Writeln(C);
end;

begin
  A := 1;
  B := 1;
  SomeProcedure;
end.

What is the current bug behavior?

Compilation ends with internal error 200502052

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information