← board

ReallocMem builds only on x86-64

GetMem(p, 4); ReallocMem(p, 1000);
{ --target=i386: builtin/special call not yet supported (builtin id 103) }

Cause and fix

The ReallocMem branch in pasparser_stmt.inc builds p := <call -103>(p, n). Each backend lowers the negative ids it knows. Only ir_codegen.inc (x86-64) has a case for -103. When the target is not x86-64 and the heap unit is loaded, the call now names PXXRealloc (builtinheap.pas) and passes an alignment of 8. x86-64 keeps its inline path unchanged.

Measured (2026-09-29, fixedpoint 85195073c2f0)

Same class: other special ids with one implementation

A census of negative call ids across the backends' codegen files, each checked with a probe: