OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [unsorted/] [subcc.c] - Rev 154

Compare with Previous | Blame | View Log

int foo (a, c)
{
  int b;
 
  if (a + c >= 0)			/* b < 0 ==== a < 10? */
    return a | 0x80000000;
  return 0;
}
 
void bar (a)
     int a;
{
  if (foo (a, 10) & 0x80000000)
    printf ("y");
  else
    printf ("n");
}
 
int main ()
{
  bar (0);
  bar (1);
  bar (-1);
  bar (10);
  bar (-10);
  bar (11);
  bar (-11);
  bar (0x7fffffff);
  bar (-0x7fffffff);
 
  puts ("");
  return 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.