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] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O2 -funroll-loops -ffast-math -fvariable-expansion-in-unroller" } */
3
 
4
extern void abort (void);
5
 
6
float array[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
7
 
8
int
9
foo (int n)
10
{
11
  unsigned i;
12
  float accum = 0;
13
 
14
  for (i = 0; i < n; i++)
15
    accum += array[i];
16
 
17
  if (accum != 55)
18
    abort ();
19
 
20
  return 0;
21
}
22
 
23
int
24
main (void)
25
{
26
  return foo (10);
27
}
28
 
29
 

powered by: WebSVN 2.1.0

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