Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/931102-1.c

raw
1 /* { dg-additional-options "-std=gnu89" } */
2 typedef union
3 {
4 struct
5 {
6 char h, l;
7 } b;
8 } T;
9
10 f (x)
11 int x;
12 {
13 int num = 0;
14 T reg;
15
16 reg.b.l = x;
17 while ((reg.b.l & 1) == 0)
18 {
19 num++;
20 reg.b.l >>= 1;
21 }
22 return num;
23 }
24
25 main ()
26 {
27 if (f (2) != 1)
28 abort ();
29 exit (0);
30 }
31