From 0c00d5f3da0cf656d08ce7877e4da393576ef2a2 Mon Sep 17 00:00:00 2001 From: Falk Hueffner Date: Sat, 27 Nov 2004 17:49:53 +0100 Subject: * gcc.dg/loop-6.c: New test. From-SVN: r91378 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/loop-6.c | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/loop-6.c (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a80759b..3965e60 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2004-11-27 Falk Hueffner + + * gcc.dg/loop-6.c: New test. + 2004-11-27 Jakub Jelinek * gcc.c-torture/execute/20041126-1.c: New test. diff --git a/gcc/testsuite/gcc.dg/loop-6.c b/gcc/testsuite/gcc.dg/loop-6.c new file mode 100644 index 0000000..653854e --- /dev/null +++ b/gcc/testsuite/gcc.dg/loop-6.c @@ -0,0 +1,25 @@ +/* PR optimization/18577 */ +/* Origin: Falk Hueffner */ + +/* { dg-do run } */ +/* { dg-options "-O2 -funroll-all-loops" } */ + +static float tfcos12[3]; +__attribute__((noinline)) double f(double x) { return x; } +int g; + +int main(void) +{ + int i, j; + for (i = 0; i < 1; i++) + tfcos12[i] = 0.5; + + for (i = 0; i < 1; i++) + { + tfcos12[i] = 0.5 * f(i); + for (j = 0; j < 12; j++) + g++; + } + + return 0; +} -- cgit v1.1