blob: 99c52351e702cba857a30c3c7af24daa552cd64d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
puti @= fn(x: int) {
#C("printf(\"%ld\\n\", (long)x);
");
};
total @= fn() int {
t := 0;
x := new(int,10);
i := 0;
while i < x.len {
x[i] = i;
i = i + 1;
}
x.len = 5;
i = 0;
while i < x.len {
t = t + x[i];
i = i + 1;
}
t
};
main @= fn() {
puti(total());
X @= total();
puti(X);
puti(#sizeof(int));
puti(#alignof(int));
puti(#sizeof({ Foo @= struct { x: i64; y: char; } ; f: Foo; f }));
};
|