blob: 3ba855301a1582d12cdfa0bcddc2ccef84bc4b1f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
void abort (void);
void exit (int);
typedef struct
{
unsigned char a __attribute__ ((packed));
unsigned short b __attribute__ ((packed));
} three_byte_t;
unsigned char
f (void)
{
return 0xab;
}
unsigned short
g (void)
{
return 0x1234;
}
int
main (void)
{
three_byte_t three_byte;
three_byte.a = f ();
three_byte.b = g ();
if (three_byte.a != 0xab || three_byte.b != 0x1234)
abort ();
exit (0);
}
|