libs-base/config/config.align.c
Richard Frith-MacDonald 891924ac68 Fix bug #16342
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22824 72102866-910b-0410-8b05-ffd578937521
2006-04-26 12:33:58 +00:00

21 lines
555 B
C

/* This program will most likely crash on systems that need shorts and ints
to be word aligned
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.
*/
int main ()
{
char buf[12];
short sval = 4;
int ival = 3;
*(short *)(buf+1) = sval;
*(int *)(buf+1) = ival;
buf[0] = 0;
puts (buf); /* force compiler not to optimise out the above assignments */
exit (0);
}