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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr44913.c] - Blame information for rev 749

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
 
3
void __attribute__((noinline,noclone))
4
foo (int *a, int n)
5
{
6
  int *lasta = a + n;
7
  for (; a != lasta; a++)
8
    {
9
      *a *= 2;
10
      a[1] = a[-1] + a[-2];
11
    }
12
}
13
extern void abort (void);
14
int main()
15
{
16
  int a[16] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
17
  int r[16] = { 1, 2, 6, 6, 16, 24, 44, 80, 136, 248, 432, 768, 1360, 2400, 4256, 3760 };
18
  unsigned i;
19
  foo (&a[2], 13);
20
  for (i = 0; i < 8; ++i)
21
    if (a[i] != r[i])
22
      abort ();
23
  return 0;
24
}

powered by: WebSVN 2.1.0

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