2000-05-03 03:14:14 +00:00
|
|
|
/* This program will most likely crash on systems that need shorts and ints
|
|
|
|
to be word aligned
|
2005-07-15 22:51:23 +00:00
|
|
|
Copyright (C) 2005 Free Software Foundation
|
|
|
|
|
|
|
|
Copying and distribution of this file, with or without modification,
|
|
|
|
are permitted in any medium without royalty provided the copyright
|
|
|
|
notice and this notice are preserved.
|
|
|
|
|
2000-05-03 03:14:14 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
int main ()
|
|
|
|
{
|
|
|
|
char buf[12];
|
|
|
|
short sval = 4;
|
|
|
|
int ival = 3;
|
|
|
|
*(short *)(buf+1) = sval;
|
|
|
|
*(int *)(buf+1) = ival;
|
2006-04-26 12:33:58 +00:00
|
|
|
buf[0] = 0;
|
|
|
|
puts (buf); /* force compiler not to optimise out the above assignments */
|
2000-05-03 03:14:14 +00:00
|
|
|
exit (0);
|
|
|
|
}
|