From ecc350ca5c2eb50be8309c5f14f8bf0d87db9a02 Mon Sep 17 00:00:00 2001 From: Moon Flower Date: Mon, 12 Oct 2026 08:46:23 +0330 Subject: a --- tests/programs/bounds_hi.zc | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/programs/bounds_hi.zc (limited to 'tests/programs/bounds_hi.zc') diff --git a/tests/programs/bounds_hi.zc b/tests/programs/bounds_hi.zc new file mode 100644 index 0000000..d61179d --- /dev/null +++ b/tests/programs/bounds_hi.zc @@ -0,0 +1,8 @@ +// the index is not the induction variable. i + 1 walks off the end. +o3 fn main() { + fixed []int f = new(fixed []int, 4); + int n = len(f), i; + for (i = 0; i < n; i++) f[i + 1] = 1; + free(d*f); + return 0; +} -- cgit v1.2.3