aboutsummaryrefslogtreecommitdiff
path: root/tests/programs/o3_bounds.zc
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-14 16:25:05 +0330
committerGravatar zinc <zinc@downsta.ir> 2026-10-14 16:25:05 +0330
commit8a7092df7b7fc8a5eb4f02ef14588246bd111daf (patch)
tree0d9d28ca93ccbddb1f99cb02b88ed466e0ade481 /tests/programs/o3_bounds.zc
parenthistory: 43-stdlib notes point forward to zc0 no longer reserving u, m and d (diff)
parentmerge bounds checking (diff)
Merge branch 'main' into work/xref
Diffstat (limited to 'tests/programs/o3_bounds.zc')
-rw-r--r--tests/programs/o3_bounds.zc3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/programs/o3_bounds.zc b/tests/programs/o3_bounds.zc
index eaf92eb..cd65548 100644
--- a/tests/programs/o3_bounds.zc
+++ b/tests/programs/o3_bounds.zc
@@ -1,5 +1,6 @@
namespace;
include rt;
-// an index outside a T[?] inside o3 code: caught by the inline check
+// an index outside a T[?] inside o3 code: o3 implies unbounded, so nothing checks it
+// (the write lands in the slack of the buddy block) and the program ends normally
fn main() { int[?] a = rt.new(int[?], 5); o3 { int i = 7; a[i] = 1; } rt.free(d*a); return 0; }