8sa1-gcc/gcc/testsuite/gcc.c-torture/unsorted/andmem.c
Jeff Law 921e5a0eb4 Initial revision
From-SVN: r14840
1997-08-19 01:34:40 -06:00

23 lines
377 B
C

void p1 (p) int *p;
{ *p &= ~0xff;
}
void p2 (p) int *p;
{ *p &= ~0xff00;
}
void p3 (p) int *p;
{ *p &= ~0xffff0000;
}
void p4 (p) int *p;
{ *p &= ~0xffff;
}
main ()
{
int a;
a = 0x12345678; p1 (&a); printf ("%x\n", a);
a = 0x12345678; p2 (&a); printf ("%x\n", a);
a = 0x12345678; p3 (&a); printf ("%x\n", a);
a = 0x12345678; p4 (&a); printf ("%x\n", a);
}