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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [graphite/] [interchange-5.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

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