aboutsummaryrefslogtreecommitdiff
path: root/tests/programs/o3_bounds.zc
blob: cd655487cfe65f49359e572680e4783303e126a1 (plain) (blame)
1
2
3
4
5
6
namespace;
include rt;

// 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; }