diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/graphite/interchange-10.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/graphite/interchange-10.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-10.c b/gcc/testsuite/gcc.dg/graphite/interchange-10.c index 0cd22a3b412..17f807b0c07 100644 --- a/gcc/testsuite/gcc.dg/graphite/interchange-10.c +++ b/gcc/testsuite/gcc.dg/graphite/interchange-10.c @@ -1,5 +1,14 @@ +/* { dg-require-effective-target size32plus } */ + +#define DEBUG 0 +#if DEBUG +#include <stdio.h> +#endif + double u[1782225]; -int foo(int N, int *res) + +static void __attribute__((noinline)) +foo (int N, int *res) { int i, j; double sum = 0.0; @@ -12,7 +21,24 @@ int foo(int N, int *res) for (j = 0; j < N; j++) sum = sum + u[i + 1335 * j]; - *res = sum + N; + *res = sum + N + u[1336 * 2] + u[1336]; +} + +int +main (void) +{ + int i, res; + + for (i = 0; i < 1782225; i++) + u[i] = 2; + + foo (1335, &res); + +#if DEBUG + fprintf (stderr, "res = %d \n", res); +#endif + + return res != 7130239; } /* { dg-final { scan-tree-dump-times "will be interchanged" 2 "graphite" } } */ |