summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/960909-1.c
blob: de1ed9339781c21a26eefa1c70d6570bd59e36ac (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
25
26
27
28
29
int
ffs (x)
     int x;
{
  int bit, mask;

  if (x == 0)
    return 0;

  for (bit = 1, mask = 1; !(x & mask); bit++, mask <<= 1)
    ;

  return bit;
}

f (x)
     int x;
{
  int y;
  y = ffs (x) - 1;
  if (y < 0) 
    abort ();
}

main ()
{
  f (1);
  exit (0);
}