aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/4-statements/uninit_both_branches_ok.zc
blob: 205acdf02ea0e8efab8d12acc0112729b479212f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
// expect: 1/
// spec 4.1.5: every branch assigns before the join
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
fn main() {
	int x;
	if (1) x = 1; else x = 2;
	pn(x);
	return 0;
}
// zc0: skip