blob: ccb7e3a8334f93ea0a8a6ec1b7aacbc7875e0d03 (
plain) (
blame)
1
2
3
4
5
6
7
|
// expect error: zy: index 5 out of range (length 5)
// spec 8.4: p[n] is outside even though the block has slack (5 words in a 16-word block, whose payload is 11)
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
int at(word* p, int i) { p[i] = 7; return p[i]; }
fn main() { word* p = rt.new(5); pn(at(p, 5)); return 0; }
// zc0: skip
|