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/] [950512-1.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
unsigned
2
f1 (x)
3
{
4
  return ((unsigned) (x != 0) - 3) / 2;
5
}
6
 
7
unsigned long long
8
f2 (x)
9
{
10
  return ((unsigned long long) (x != 0) - 3) / 2;
11
}
12
 
13
main ()
14
{
15
  if (f1 (1) != (~(unsigned) 0) >> 1)
16
    abort ();
17
  if (f1 (0) != ((~(unsigned) 0) >> 1) - 1)
18
    abort ();
19
  if (f2 (1) != (~(unsigned long long) 0) >> 1)
20
    abort ();
21
  if (f2 (0) != ((~(unsigned long long) 0) >> 1) - 1)
22
    abort ();
23
  exit (0);
24
}

powered by: WebSVN 2.1.0

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