test: Phase 132 LLVM EXE regression smoke (minimal)
This commit is contained in:
19
apps/tests/phase132_return_loop_var_min.hako
Normal file
19
apps/tests/phase132_return_loop_var_min.hako
Normal 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user