OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [960909-1.c] - Rev 297

Compare with Previous | Blame | View Log

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);
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.