OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [graphite/] [block-1.c] - Blame information for rev 338

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
#define MAX 100
9
 
10
extern void abort ();
11
 
12
int
13
main (void)
14
{
15
  int i, j;
16
  int sum = 0;
17
  int A[MAX * MAX];
18
  int B[MAX * MAX];
19
 
20
  for (i = 0; i < MAX; i++)
21
    for (j = 0; j < MAX; j++)
22
      {
23
        A[i*MAX + j] = j;
24
        B[i*MAX + j] = j;
25
      }
26
 
27
  for (i = 0; i < MAX; i++)
28
    for (j = 0; j < MAX; j++)
29
      A[i*MAX + j] += B[j*MAX + i];
30
 
31
  for(i = 0; i < MAX; i++)
32
    for(j = 0; j < MAX; j++)
33
      sum += A[i*MAX + j];
34
 
35
#if DEBUG
36
  fprintf (stderr, "sum = %d \n", sum);
37
#endif
38
 
39
  if (sum != 990000)
40
    abort ();
41
 
42
  return 0;
43
}
44
 
45
/* { dg-final { scan-tree-dump-times "will be loop blocked" 2 "graphite" { xfail *-*-* } } } */
46
/* { 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.