blob: d5501d3a7d746d59e8e4d3940013e5443bc9313c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
unsigned long bad(int reg, unsigned long inWord)
{
union {
unsigned long word;
unsigned char byte[4];
} data;
data.word = inWord;
data.byte[reg] = 0;
return data.word;
}
main()
{
/* XXX This test could be generalized. */
if (sizeof (long) != 4)
exit (0);
if (bad (0, 0xdeadbeef) == 0xdeadbeef)
abort ();
exit (0);
}
|