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.2.2/] [gcc/] [testsuite/] [gcc.dg/] [pr29581-2.c] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* PR tree-optimization/29581 */
2
/* Origin: gcc.dg/vect/vect-86.c */
3
/* { dg-do run } */
4
/* { dg-options "-O2 -ftree-loop-linear" } */
5
 
6
extern void abort (void);
7
 
8
#define N 16
9
 
10
int main1 (int n)
11
{
12
  int i, j, k;
13
  int a[N], b[N];
14
 
15
  for (i = 0; i < n; i++)
16
    {
17
      for (j = 0; j < n; j++)
18
        {
19
          k = i + n;
20
          a[j] = k;
21
        }
22
      b[i] = k;
23
    }
24
 
25
 
26
  for (j = 0; j < n; j++)
27
    if (a[j] != i + n - 1)
28
      abort();
29
 
30
  for (i = 0; i < n; i++)
31
    if (b[i] != i + n)
32
      abort();
33
 
34
  return 0;
35
}
36
 
37
int main (void)
38
{
39
  main1 (N);
40
  main1 (0);
41
  main1 (1);
42
  main1 (2);
43
  main1 (N-1);
44
 
45
  return 0;
46
}

powered by: WebSVN 2.1.0

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