summaryrefslogtreecommitdiff
path: root/tests/sizeof.toc
blob: a12648e864cecc2fee96793d6054766e1c504527 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "std/io.toc", io;

Point3D ::= struct {
	x, y, z: f32;
}

calculation ::= fn() int {
	p: Point3D;
	return (#sizeof Point3D) * (#sizeof typeof p) * (sizeof Point3D) * (sizeof typeof p)
	* (#alignof Point3D) * (#alignof typeof p) * (alignof Point3D) * (alignof typeof p);
}

main ::= fn() {
	x ::= calculation();
	io.puti(x);
	io.puti(calculation());
}