#include "printf.h"

struct unaligned {
	char first;
	int second;
} __attribute__((packed));

union test {
	struct unaligned data;
	char cdata[3];
};

int main() {
	union test test;
	int data, tmp;
	test.cdata[0] = 0x1;
	test.cdata[1] = 0x2;
	test.cdata[2] = 0x3;
	
	data = test.data.second;
	memcpy(&tmp, &test.data.second);
	printf("%x %x %x\r\n", test.data.second, data, tmp);
}
