OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [graphite/] [interchange-11.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-require-effective-target size32plus } */
2
 
3
#define DEBUG 0
4
#if DEBUG
5
#include <stdio.h>
6
#endif
7
 
8
double u[1782225];
9
 
10
static void __attribute__((noinline))
11
foo (int N, int *res)
12
{
13
  int i, j;
14
  double sum = 0.0;
15
 
16
  for (i = 0; i < 1335; i++)
17
    {
18
      for (j = 0; j < 1335; j++)
19
        sum = sum + u[i + 1335 * j];
20
 
21
      u[1336 * i] *= 2;
22
    }
23
  *res = sum;
24
}
25
 
26
extern void abort ();
27
 
28
int
29
main (void)
30
{
31
  int i, res;
32
 
33
  for (i = 0; i < 1782225; i++)
34
    u[i] = 2;
35
 
36
  foo (1335, &res);
37
 
38
#if DEBUG
39
  fprintf (stderr, "res = %d \n", res);
40
#endif
41
 
42
  if (res != 3564450)
43
    abort ();
44
 
45
  return 0;
46
}
47
 
48
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */
49
/* { dg-final { cleanup-tree-dump "graphite" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.