blob: 4bcf8cf6b559fab3c18976ee11dfe7838489fdec (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// expect: 1/1/1/1/
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
struct pt { int x; int y; }
int gv;
fn main() {
int a = 3;
int* pa = &a;
*pa = 4;
pn(a == 4);
*(&gv) = 8;
pn(gv == 8);
pt* q = rt.new(pt);
int* py = &q.y;
*py = 6;
pn(q.y == 6);
int[3] arr;
int* pe = &arr[2];
*pe = 1;
pn(arr[2]);
rt.free(q);
return 0;
}
// zc0: skip
|