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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr25125.c] - Rev 816

Compare with Previous | Blame | View Log

extern void exit (int);
extern void abort (void);
extern unsigned short f (short a) __attribute__((__noinline__));
 
unsigned short
f (short a)
{
  short b;
 
  if (a > 0)
    return 0;
  b = ((int) a) + - (int) 32768;
  return b;
}
 
int
main (void)
{
  if (sizeof (short) < 2
      || sizeof (short) >= sizeof (int))
    exit (0);
 
  if (f (-32767) != 1)
    abort ();
 
  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.