aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/6-ownership/if_join_free_one_branch.zc
blob: 77ccd23c53829f963098151493cf11cff43589f1 (plain) (blame)
1
2
3
4
5
6
// expect: 1/
// spec 6.10.1: dead on one path and m on the other becomes dead, freed on the live path
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
fn main() { int* p = rt.new(1); p[0] = 1; if (p[0]) { pn(p[0]); rt.free(p); } return 0; }
// zc0: skip