OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [graphite/] [run-id-2.c] - Rev 298

Compare with Previous | Blame | View Log

int a[1] = {1};
 
static int __attribute__((noinline))
foo(int n)
{
  int i, c = 0;
  for (i = 0; i < n; i++)
    c += a[i];
  return c;
}
 
int b[2] = {2, 3};
 
static int __attribute__((noinline)) bar(int n)
{
  int i, c = 0;
  for (i = 0; i < n; i++)
    c += b[i];
  return c;
}
 
int main()
{
  return
   foo(0) != 0 || foo(1) != 1 || bar(0) != 0 || bar(1) != 2 || bar(2) != 5;
}
 
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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