OSDN Git Service

Fix PR 17408 and PR 17409.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.c-torture / execute / 960909-1.c
1 int
2 ffs (x)
3      int x;
4 {
5   int bit, mask;
6
7   if (x == 0)
8     return 0;
9
10   for (bit = 1, mask = 1; !(x & mask); bit++, mask <<= 1)
11     ;
12
13   return bit;
14 }
15
16 f (x)
17      int x;
18 {
19   int y;
20   y = ffs (x) - 1;
21   if (y < 0) 
22     abort ();
23 }
24
25 main ()
26 {
27   f (1);
28   exit (0);
29 }