aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/8-runtime/new_too_big_traps.zc
blob: b1692f22fcd2d598671d7b6aac792d516fbc676e (plain) (blame)
1
2
3
4
5
6
// expect error: zc: out of heap memory
// spec 8.4: a request over 2^31 - 1 words (less the header) stops at the allocation; the length is never truncated
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
fn main() { word* p = rt.new(0x80000000); pn(p[0]); return 0; }
// zc0: skip