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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20010717-1.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 688 jeremybenn
extern void abort (void);
2
 
3
int
4
main ()
5
{
6
  int i, j;
7
  unsigned long u, r1, r2;
8
 
9
  i = -16;
10
  j = 1;
11
  u = i + j;
12
 
13
  /* no sign extension upon shift */
14
  r1 = u >> 1;
15
  /* sign extension upon shift, but there shouldn't be */
16
  r2 = ((unsigned long) (i + j)) >> 1;
17
 
18
  if (r1 != r2)
19
    abort ();
20
 
21
  return 0;
22
}

powered by: WebSVN 2.1.0

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