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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20060102-1.c] - Diff between revs 297 and 338

Only display areas with differences | Details | Blame | View Log

Rev 297 Rev 338
extern void abort ();
extern void abort ();
 
 
int f(int x)
int f(int x)
{
{
  return (x >> (sizeof (x) * __CHAR_BIT__ - 1)) ? -1 : 1;
  return (x >> (sizeof (x) * __CHAR_BIT__ - 1)) ? -1 : 1;
}
}
 
 
volatile int one = 1;
volatile int one = 1;
int main (void)
int main (void)
{
{
  /* Test that the function above returns different values for
  /* Test that the function above returns different values for
     different signs.  */
     different signs.  */
  if (f(one) == f(-one))
  if (f(one) == f(-one))
    abort ();
    abort ();
  return 0;
  return 0;
}
}
 
 
 
 

powered by: WebSVN 2.1.0

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