Port IR_ALLOCA to xtensa
Found 2026-09-24 (frankS) by the esp32s3 leg of tools/run_c_conformance_esp.sh:
00207.c (a VLA) is unsupported node in IR codegen: alloca.
Measured
- 00207.c passes byte-exact at HEAD on riscv32, arm32, i386 and aarch64 (qemu-user) and on esp32c3 under IDF; the desktop skip lines claiming "alloca is x86-64 only" were stale and were removed the same day.
- xtensa refuses at codegen, both ABIs.
Why it was not done with the finding
The windowed backend's constant-sp model (see XtSpillDepth,
XtensaLoadArgRegsWindowed, XTENSA_WIN_* reserves in defs.inc) means an
alloca is not "sub sp; relocate": every sp-relative slot the body has already
computed an offset for moves with it, and the base save area below sp must
move too (movsp). That wants a design pass, not a same-session port.
Condition that retires this
00207.c PASS on tools/run_c_conformance_esp.sh --chip esp32s3, and a hosted
call0 row against x86-64 in test-xtensa.
Log
- 2026-09-24 — resolved; this names the commit that carried the resolve, which is not always the one that carried the change — commit 60c34618a.