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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [961213-1.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
int
2
g (unsigned long long int *v, int n, unsigned int a[], int b)
3
{
4
  int cnt;
5
  *v = 0;
6
  for (cnt = 0; cnt < n; ++cnt)
7
    *v = *v * b + a[cnt];
8
  return n;
9
}
10
 
11
main ()
12
{
13
  int res;
14
  unsigned int ar[] = { 10, 11, 12, 13, 14 };
15
  unsigned long long int v;
16
 
17
  res = g (&v, sizeof(ar)/sizeof(ar[0]), ar, 16);
18
  if (v != 0xabcdeUL)
19
    abort ();
20
 
21
  exit (0);
22
}

powered by: WebSVN 2.1.0

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