aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/3-expressions/ptr_index_scaled.zc
blob: fd61dd9afd7e4f6dd0237de65a80aaf92d691a23 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
// expect: 7/9/
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
struct trip { int a; int b; int c; }
fn main() {
	trip* t = rt.new(trip, 2);
	int* w = (int*)t;
	w[3] = 7; w[5] = 9;
	pn(t[1].a); pn(t[1].c);
	rt.free(t);
	return 0;
}
// zc0: skip