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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 688 jeremybenn
long long
2
signed_poly (long long sum, long x)
3
{
4
  sum += (long long) (long) sum * (long long) x;
5
  return sum;
6
}
7
 
8
unsigned long long
9
unsigned_poly (unsigned long long sum, unsigned long x)
10
{
11
  sum += (unsigned long long) (unsigned long) sum * (unsigned long long) x;
12
  return sum;
13
}
14
 
15
int
16
main (void)
17
{
18
  if (signed_poly (2LL, -3) != -4LL)
19
    abort ();
20
 
21
  if (unsigned_poly (2ULL, 3) != 8ULL)
22
    abort ();
23
 
24
  exit (0);
25
}

powered by: WebSVN 2.1.0

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