// Previously, Progvis crashed when using e.g. semaphore without
// using the Ptr<semaphore> type. This was because the system
// created a "copy" of the type "semaphore", which was never
// instantiated and therefore never had its members laid out.

struct test {
	int x;
	struct semaphore y;
};

int main(void) {
	struct test *t = malloc(sizeof(struct test));
	// sema_init(&t->y, 0); // skipping this caused a crash.
	printf("%d\n", t->x);
	return 0;
}
