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/] [pr25125.c] - Diff between revs 297 and 338

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

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

powered by: WebSVN 2.1.0

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