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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr25125.c] - Blame information for rev 688

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
extern void exit (int);
2
extern void abort (void);
3
extern unsigned short f (short a) __attribute__((__noinline__));
4
 
5
unsigned short
6
f (short a)
7
{
8
  short b;
9
 
10
  if (a > 0)
11
    return 0;
12
  b = ((int) a) + - (int) 32768;
13
  return b;
14
}
15
 
16
int
17
main (void)
18
{
19
  if (sizeof (short) < 2
20
      || sizeof (short) >= sizeof (int))
21
    exit (0);
22
 
23
  if (f (-32767) != 1)
24
    abort ();
25
 
26
  exit (0);
27
}

powered by: WebSVN 2.1.0

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