summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/graphite/run-id-pr42644.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/graphite/run-id-pr42644.c')
-rw-r--r--gcc/testsuite/gcc.dg/graphite/run-id-pr42644.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/graphite/run-id-pr42644.c b/gcc/testsuite/gcc.dg/graphite/run-id-pr42644.c
new file mode 100644
index 000000000..d134b5c30
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/run-id-pr42644.c
@@ -0,0 +1,37 @@
+/* Testcase extracted from test 183.equake in SPEC CPU2000. */
+double Ke[2], ds[2];
+
+void foo(double Ke[2], int i, double ds[], int column)
+{
+ double tt, ts;
+ int j;
+
+ for (j = 0; j < 2; j++)
+ {
+ ++column;
+ ts = ds[i];
+ if (i == j)
+ tt = 123;
+ else
+ tt = 0;
+ Ke[column] = Ke[column] + ts + tt;
+ }
+}
+
+extern void abort ();
+
+int
+main ()
+{
+ int i, j;
+
+ ds[0] = 1.0;
+ ds[1] = 1.0;
+
+ foo(Ke, 0, ds, -1);
+
+ if ((int) Ke[0] != 124)
+ abort ();
+
+ return 0;
+}