* gcc.dg/loop-6.c: New test.
authorFalk Hueffner <falk@debian.org>
Sat, 27 Nov 2004 16:49:53 +0000 (17:49 +0100)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 27 Nov 2004 16:49:53 +0000 (16:49 +0000)
From-SVN: r91378

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/loop-6.c [new file with mode: 0644]

index a80759b488e254f28bd21bc451960c40e3770464..3965e60cf4e5f19837f3a8ec44b6c5576fad4169 100644 (file)
@@ -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 (file)
index 0000000..653854e
--- /dev/null
@@ -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;
+}