Chez Scheme 10.3.0 fails when compiling Idris2 on 32-bit ARM (armv7, Alpine Linux,
musl). The same Idris2 sources build successfully with Chez Scheme 10.2.0 on armv7,
and with Chez 10.3.0 on x86 and x86_64.
The failure happens during compile-program of idris2-boot.ss:
Exception in +: #f is not a number
Entering the Chez debugger and inspecting the continuation shows that
binary-imm-op receives #f as its last argument.
Continuation snapshot:
# : show
0: (reg . %r3)
1: (reg . %sfp)
2: 25032
3: ((long . 3985869568))
4: (137)
5: addi
6: #f ;; <-- unexpected
This leads to:
Exception in +: #f is not a number
This appears to be a code generator issue for ARM32 in 10.3: the same
operation works on x86/x86_64, and the same Idris2 bootstrap works on
armv7 with Chez 10.2.0.
Reproduction (on armv7):
chez --debug-on-exception --program idris2_app/idris2-boot.ss
Environment:
Alpine Linux edge
arch: armv7 (ARMv7-A, hardfloat)
libc: musl
Chez Scheme: 10.3.0 (Alpine package)