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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [graphite/] [block-0.c] - Blame information for rev 826

Details | Compare with Previous | View Log

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