aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/3-expressions/assign_to_deref_and_field.zc
blob: c6af1cacb29bb2ab83bb08193aba7c6b27409d5b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// expect: 5/6/
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
struct pt { int x; int y; }
fn main() {
	int[2] a;
	int* p = a;
	*p = 5;
	pt* q = rt.new(pt);
	q.y = 6;
	pn(a[0]); pn(q.y);
	rt.free(q);
	return 0;
}
// zc0: skip