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
|
|
|
*/
|
2014-06-20 16:57:59 +00:00
|
|
|
#include <stdlib.h>
|
2000-05-03 03:14:14 +00:00
|
|
|
|
|
|
|
int main ()
|
|
|
|
{
|
2013-10-07 10:36:43 +00:00
|
|
|
char *buf = malloc(30);
|
|
|
|
void *v;
|
2014-06-20 09:01:15 +00:00
|
|
|
short *sp;
|
|
|
|
short *sq;
|
2013-10-07 10:36:43 +00:00
|
|
|
int *ip;
|
|
|
|
int *iq;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0 ; i < 30; i++)
|
|
|
|
{
|
|
|
|
buf[i] = i;
|
|
|
|
}
|
|
|
|
v = buf;
|
|
|
|
|
|
|
|
sp = (short*)(v + 1);
|
|
|
|
sq = (short*)(v + 2);
|
|
|
|
if (*sp == *sq)
|
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
ip = (int*)(v + 1);
|
|
|
|
iq = (int*)(v + 2);
|
|
|
|
if (*ip == *iq)
|
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
2000-05-03 03:14:14 +00:00
|
|
|
}
|
2013-10-01 18:00:17 +00:00
|
|
|
|