test: Phase 132 LLVM EXE regression smoke (minimal)

This commit is contained in:
nyash-codex
2025-12-15 06:24:18 +09:00
parent c8970bd4d4
commit 9d57d2cb9c
2 changed files with 115 additions and 0 deletions

View File

@ -0,0 +1,19 @@
// Phase 132: Minimal test for loop variable return value
//
// Tests that exit PHI correctly returns the final loop variable value
// (not the initial value or module-level garbage).
//
// Expected output: RC:3
// - loop runs 3 iterations (i=0,1,2)
// - returns final i value (3)
static box Main {
main() {
local i
i = 0
loop(i < 3) {
i = i + 1
}
return i
}
}