diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/20030204-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/20030204-1.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/20030204-1.c b/gcc/testsuite/gcc.dg/20030204-1.c new file mode 100644 index 000000000..701ded28c --- /dev/null +++ b/gcc/testsuite/gcc.dg/20030204-1.c @@ -0,0 +1,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-*-* } && ilp32 } } } */ + + +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; +} |