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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20000412-6.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
unsigned bug (unsigned short value, unsigned short *buffer,
2
              unsigned short *bufend);
3
 
4
unsigned short buf[] = {1, 4, 16, 64, 256};
5
int main()
6
{
7
  if (bug (512, buf, buf + 3) != 491)
8
    abort ();
9
 
10
  exit (0);
11
}
12
 
13
unsigned
14
bug (unsigned short value, unsigned short *buffer, unsigned short *bufend)
15
{
16
  unsigned short *tmp;
17
 
18
  for (tmp = buffer; tmp < bufend; tmp++)
19
    value -= *tmp;
20
 
21
  return value;
22
}

powered by: WebSVN 2.1.0

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