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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [pr24930.c] - Rev 859

Go to most recent revision | Compare with Previous | Blame | View Log

/* PR 24930 */
extern int foo(int u) __attribute__((noinline));
int foo(int u) {return 0;}
int
main(int argc, char** argv)
{
  const char *buf = argv[1];
 
  unsigned int data = (((unsigned int) buf[0]) << 8) + (unsigned int) buf[1];
  if (data & 0x8000) {
    data &= 0x7fff ;
    data ^= 0x7fff ;
    data += 1 ;
    data *= -1 ;
  }
  return foo((int)data);
}
 

Go to most recent revision | 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.