tcc-65816/test/tests/bf-pack-1.c
2017-06-09 13:52:12 +02:00

24 lines
284 B
C

struct foo
{
unsigned half:8;
unsigned long __attribute__((packed)) whole:16;
};
f (struct foo *q)
{
if (q->half != 0x12)
abort ();
if (q->whole != 0x5678L)
abort ();
}
main ()
{
struct foo bar;
bar.half = 0x12;
bar.whole = 0x5678L;
f (&bar);
exit (0);
}