blob: 82775d1ca409bb15cbcae26e6e152a1c04b3149c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/* { dg-additional-options "-std=gnu89" } */
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);
}
|