← board

64-bit gaps in pinned v9: xor operator, large shifts, 64-bit hex literals

Symptoms (all against stable_linux_amd64/default/v9)

  1. xor operator unrecognized. and / or / shl / shr work; xor does not:

    c := a xor b;   -> pascal26: error: undefined variable (xor)
    

    Fails for Integer, Int64 and UInt64 operands alike.

  2. shl / shr by >= ~31 yield 0, even on 64-bit operands:

    u := 1; u := u shl 40;   -> u = 0     (expected 2^40)
    s shr 32 / s shr 33      -> 0
    

    Small shifts (e.g. shr 16) are fine.

  3. 64-bit hex literals truncate to 32 bits.

    s := $853C49E6748FEA9B;  -> only the low 32 bits ($748FEA9B) survive
    

    By contrast, Int64 decimal literals + 64-bit add/compare/store work (a := 10000000000; a > 4000000000 -> true), so this is specific to the hex-literal path and to the shift/xor operators, not 64-bit storage in general.

Repro

program t; var a,b,c: Integer;
begin a:=12; b:=10; c := a xor b; writeln(c); end.   { error: undefined variable (xor) }
program t; var u: UInt64;
begin u:=1; u:=u shl 40; writeln(u); end.             { prints 0 }

Direction

Each is independently testable; a combined test (build a known 64-bit constant via hex, shift it, xor it, compare to the decimal form) would cover all three.

Log

Resolution (2026-06-19) — DONE (commit 7d4ea89)

All three defects fixed; splitmix64 now byte-identical across all 4 targets.