shithub: scc

ref: f0dc7b162e3c03dfd5628941f0d1048fa0fdfda9
dir: /tests/cc/execute/0047-anonexport.c/

View raw version
typedef struct {
	int a;
	union {
		int b1;
		int b2;
	};
	struct { union { struct { int c; }; struct {}; }; };
	struct {};
	struct {
		int d;
	};
} s;

int
main()
{
	s v;
	
	v.a = 1;
	v.b1 = 2;
	v.c = 3;
	v.d = 4;
	
	if (v.a != 1)
		return 1;
	if (v.b1 != 2 && v.b2 != 2)
		return 2;
	if (v.c != 3)
		return 3;
	if (v.d != 4)
		return 4;
	
	return 0;
}