summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-27 16:49:53 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-27 16:49:53 +0000
commit93aa85c709bc79cfb4c1964eac55e118eb25621b (patch)
treee47f8657741bec48efd4ededa6fb169ae267b589
parent1b5d7d3d0fceb9dbeef644642664c9144a8f4c09 (diff)
downloadppe42-gcc-93aa85c709bc79cfb4c1964eac55e118eb25621b.tar.gz
ppe42-gcc-93aa85c709bc79cfb4c1964eac55e118eb25621b.zip
* gcc.dg/loop-6.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91378 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/loop-6.c25
2 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a80759b488e..3965e60cf4e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2004-11-27 Falk Hueffner <falk@debian.org>
+
+ * gcc.dg/loop-6.c: New test.
+
2004-11-27 Jakub Jelinek <jakub@redhat.com>
* 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 00000000000..653854eb8a0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/loop-6.c
@@ -0,0 +1,25 @@
+/* PR optimization/18577 */
+/* Origin: Falk Hueffner <falk@debian.org> */
+
+/* { 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;
+}
OpenPOWER on IntegriCloud