summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/graphite/interchange-4.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-06 21:44:56 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-06 21:44:56 +0000
commit3c0d801cdcce83e1739c42de0e26106281a61df9 (patch)
treea4bb1c0be4d5153898c2f02a7677e835473d9781 /gcc/testsuite/gcc.dg/graphite/interchange-4.c
parent7b919065100b9d5597126afce413f6caa6277704 (diff)
downloadgcc-3c0d801cdcce83e1739c42de0e26106281a61df9.tar.gz
2010-02-06 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 156556 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@156557 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/graphite/interchange-4.c')
-rw-r--r--gcc/testsuite/gcc.dg/graphite/interchange-4.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-4.c b/gcc/testsuite/gcc.dg/graphite/interchange-4.c
index c0ec7fa3c81..5d3c7b186f6 100644
--- a/gcc/testsuite/gcc.dg/graphite/interchange-4.c
+++ b/gcc/testsuite/gcc.dg/graphite/interchange-4.c
@@ -2,8 +2,15 @@
/* Formerly known as ltrans-4.c */
+#define DEBUG 0
+#if DEBUG
+#include <stdio.h>
+#endif
+
double u[1782225];
-int foo(int N, int *res)
+
+static int __attribute__((noinline))
+foo (int N, int *res)
{
int i, j;
double sum = 0;
@@ -13,7 +20,25 @@ int foo(int N, int *res)
for (i = 0; i < N; i++)
u[1336 * i] *= 2;
- *res = sum + N;
+
+ *res = sum + N + u[1336 * 2] + u[1336];
+}
+
+int
+main (void)
+{
+ int i, j, res;
+
+ for (i = 0; i < 1782225; i++)
+ u[i] = 2;
+
+ foo (1335, &res);
+
+#if DEBUG
+ fprintf (stderr, "res = %d \n", res);
+#endif
+
+ return res != 3565793;
}
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */