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_lo.zc | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/programs/bounds_lo.zc (limited to 'tests/programs/bounds_lo.zc') diff --git a/tests/programs/bounds_lo.zc b/tests/programs/bounds_lo.zc new file mode 100644 index 0000000..896d864 --- /dev/null +++ b/tests/programs/bounds_lo.zc @@ -0,0 +1,8 @@ +// i starts negative. i < len is true for the first pass, and the index is still illegal. +fn main() { + fixed []int f = new(fixed []int, 4); + int n = len(f), i; + for (i = -1; i < n; i++) f[i] = 1; + free(d*f); + return 0; +} -- cgit v1.2.3