aboutsummaryrefslogtreecommitdiff
path: root/tests/programs
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-15 22:28:06 +0330
committerGravatar zinc <zinc@downsta.ir> 2026-10-15 22:28:06 +0330
commit5a4dc62a79af6135c7050e81a82dbfdfb0a7d4e0 (patch)
tree805283b2d30b2cf0f53af42e5a3fc119af5e839f /tests/programs
parentdefinite assignment: reading a local before it is initialized is a compile er... (diff)
uninit: track aggregate fills per part, sticky computed-index fills, &a[k] and method calls set the aggregate; fix test/example hits; docs
Diffstat (limited to 'tests/programs')
-rw-r--r--tests/programs/bench_strings.zc2
-rw-r--r--tests/programs/bounds_body.zc2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/programs/bench_strings.zc b/tests/programs/bench_strings.zc
index 6f224db..c9fcdee 100644
--- a/tests/programs/bench_strings.zc
+++ b/tests/programs/bench_strings.zc
@@ -5,7 +5,7 @@ fn work() {
let s = b"abcdefghijklmnopqrstuvwxyz0123456789";
let i, acc, n, t, part, k, reps, ch;
ch = rt.get_c();
- reps = 0;
+ reps = 0; acc = 0;
while (ch >= '0' && ch <= '9') { reps = reps * 10 + ch - '0'; ch = rt.get_c(); }
while (reps > 0) {
k = 0; acc = 0; n = rt.len_s(s);
diff --git a/tests/programs/bounds_body.zc b/tests/programs/bounds_body.zc
index ea838ac..d239802 100644
--- a/tests/programs/bounds_body.zc
+++ b/tests/programs/bounds_body.zc
@@ -4,7 +4,7 @@ include rt;
// a loop proof only holds while the body leaves the index alone: here the body
// moves i back below 0 once, so t[i] keeps its check and the access faults
int main() {
- int[4] t; int s = 0, once = 1;
+ int[4] t = {}; int s = 0, once = 1;
for (int i = 0; i < 4; i++) { s = s + t[i]; if (once) { once = 0; i = -3000; } }
rt.put_n(s); rt.put_c(10);
return 0;