summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/graphite/interchange-1.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-1.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-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/graphite/interchange-1.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-1.c b/gcc/testsuite/gcc.dg/graphite/interchange-1.c
index cd9197d4d1a..80a2e346234 100644
--- a/gcc/testsuite/gcc.dg/graphite/interchange-1.c
+++ b/gcc/testsuite/gcc.dg/graphite/interchange-1.c
@@ -2,8 +2,15 @@
/* Formerly known as ltrans-1.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 i, j;
double sum = 0.0;
@@ -15,8 +22,27 @@ int foo(int N, int *res)
u[1336 * i] *= 2;
}
- *res = sum + N;
+
+ return sum + N + u[1336 * 2] + u[1336];
}
+int
+main (void)
+{
+ int i, j, res;
+
+ for (i = 0; i < 1782225; i++)
+ u[i] = 2;
+
+ res = foo (1335);
+
+#if DEBUG
+ fprintf (stderr, "res = %d \n", res);
+#endif
+
+ return res != 3565793;
+}
+
+
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */