1 /*
2    931102-2.c from the execute part of the gcc torture suite.
3  */
4 
5 #include <testfwk.h>
6 
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
10 
11 typedef union
12 {
13   long align;
14   struct
15     {
16       short h, l;
17     } b;
18 } T;
19 
f(int x)20 int f (int x)
21 {
22   int num = 0;
23   T reg;
24 
25   reg.b.l = x;
26   while ((reg.b.l & 1) == 0)
27     {
28       num++;
29       reg.b.l >>= 1;
30     }
31   return num;
32 }
33 
34 void
testTortureExecute(void)35 testTortureExecute (void)
36 {
37   if (f (2) != 1)
38     ASSERT (0);
39   return;
40 }
41 
42