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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [20090922-1.c] - Blame information for rev 708

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -g -funroll-loops -std=gnu99" } */
3
 
4
struct S
5
{
6
  unsigned long s1;
7
  int **s2;
8
};
9
struct T
10
{
11
  unsigned long t1, t2;
12
};
13
struct U
14
{
15
  int u1, u2;
16
  unsigned long u3;
17
};
18
struct V
19
{
20
  int v1, v3;
21
  struct T *v2;
22
  struct U *v4;
23
};
24
struct W
25
{
26
  int w1;
27
  struct V **w2;
28
};
29
struct S *foo1 (void);
30
int *foo2 (void);
31
 
32
void
33
test (struct W *w)
34
{
35
  for (int i = 0; i < w->w1; i++)
36
    {
37
      struct V *v = w->w2[i];
38
      struct S *t = foo1 ();
39
      if (!t)
40
        for (int j; j < v->v1;)
41
          {
42
            struct T *q = &v->v2[j];
43
            t += (q->t2 - q->t1) * 45000L;
44
          }
45
      for (; v->v3;)
46
        {
47
          struct U *v4 = (struct U *) &v->v4;
48
          if (v4->u1 && v4->u2 >= 0 && v4->u2)
49
            {
50
              int *s = foo2 ();
51
              if (!s)
52
                for (int k = 0; k <= v4->u2; k++)
53
                  {
54
                    struct T *q = &v->v2[k];
55
                    if (k == v4->u2)
56
                      v4->u3 += (q->t1) * 1000000;
57
                  }
58
              t->s2[t->s1] = s;
59
            }
60
        }
61
      int *s = foo2 ();
62
      if (!t)
63
        t->s2[t->s1] = s;
64
    }
65
}

powered by: WebSVN 2.1.0

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