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/] [compile/] [pr24930.c] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* PR 24930 */
2
extern int foo(int u) __attribute__((noinline));
3
int foo(int u) {return 0;}
4
int
5
main(int argc, char** argv)
6
{
7
  const char *buf = argv[1];
8
 
9
  unsigned int data = (((unsigned int) buf[0]) << 8) + (unsigned int) buf[1];
10
  if (data & 0x8000) {
11
    data &= 0x7fff ;
12
    data ^= 0x7fff ;
13
    data += 1 ;
14
    data *= -1 ;
15
  }
16
  return foo((int)data);
17
}

powered by: WebSVN 2.1.0

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