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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [var-expand2.c] - Rev 298

Compare with Previous | Blame | View Log

/* { dg-do run } */
/* { dg-options "-O2 -funroll-loops -ffast-math -fvariable-expansion-in-unroller" } */
 
extern void abort (void);
 
float array[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
 
int
foo (int n)
{
  unsigned i;
  float accum = 0;
 
  for (i = 0; i < n; i++)
    accum += array[i];
 
  if (accum != 55)
    abort ();
 
  return 0;
}
 
int
main (void)
{
  return foo (10);
}
 
 
 

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.