aboutsummaryrefslogtreecommitdiff
path: root/tests/programs/bounds_hi.zc
blob: 5475764e97bf699e6d127d606dadb528a53165bf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
namespace;
include rt;

// the index is not the induction variable. i + 1 walks off the end, but o3
// implies unbounded: nothing checks it, and the write lands in the block's slack
o3 fn main() {
	fixed int[?] f = rt.new(fixed int[?], 4);
	int n = len(f), i;
	for (i = 0; i < n; i++) f[i + 1] = 1;
	rt.free(d*f);
	return 0;
}