]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
This commit was manufactured by cvs2svn to create branch
authorNo Author <no-author@gcc.gnu.org>
Thu, 12 Dec 2002 11:21:41 +0000 (11:21 +0000)
committerNo Author <no-author@gcc.gnu.org>
Thu, 12 Dec 2002 11:21:41 +0000 (11:21 +0000)
'gcc-3_2-branch'.

From-SVN: r60070

gcc/testsuite/gcc.c-torture/compile/20021212-1.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.c-torture/compile/20021212-1.c b/gcc/testsuite/gcc.c-torture/compile/20021212-1.c
new file mode 100644 (file)
index 0000000..b89669d
--- /dev/null
@@ -0,0 +1,15 @@
+/* PR optimization/8334 */
+/* Verify that GCC produces valid operands
+   after simplifying an addition. */
+
+void foo(int m, int n, double *f)
+{
+  int i, j, k = 1;
+
+  for (j = 0; j < n; j++) {
+    for (i = k; i < m; i++) {
+      f[i] = (double) (i * j);
+      f[i + j] = (double) ((i + 1) * j);
+    }
+  }
+}