aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/20030204-1.c
blob: 6b8ea4daa9ef9c6fdd37bdf979f4da104b127a1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* PR optimization/8555 */
/* { dg-do compile } */
/* { dg-options "-O -ffast-math -funroll-loops" } */
/* { dg-options "-march=pentium3 -O -ffast-math -funroll-loops" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */


float foo (float *a, int i)
{
  int j;
  float x = a[j = i - 1], y;

  for (j = i; --j >= 0; )
    if ((y = a[j]) > x)
      x = y;

  return x;
}