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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [20030904-1.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 688 jeremybenn
struct A
2
{
3
  long a1;
4
  double *a2;
5
};
6
 
7
struct B
8
{
9
  void *b1;
10
  double b2, b3;
11
  struct
12
  {
13
    int d1;
14
    double d2;
15
  } b4;
16
};
17
 
18
struct C
19
{
20
  struct A *c1;
21
  void *c2;
22
};
23
 
24
long fn1 (struct A *, double);
25
void fn2 (void *, const char *);
26
double fn3 (double);
27
double fn4 (double);
28
int fn5 (void *, double, double);
29
 
30
int
31
foo (struct B *x)
32
{
33
  struct C *e = x->b1;
34
  struct A *f = e->c1;
35
  long g, h, i;
36
  double *j, k;
37
  g = fn1 (f, 0.5 * (x->b2 + x->b3)), h = g + 1, i = f->a1;
38
  j = f->a2, k = x->b4.d2;
39
  fn2 (x, "something");
40
  if (g <= 0)
41
    {
42
      double l = j[2] - j[1];
43
      if (l > 0.0 && l <= 0.02)
44
        k = (x->b4.d1 == 1
45
             ? ((1.0 / l) < 25 ? 25 : (1.0 / l))
46
             : fn3 ((1.0 / l) < 25 ? 25 : (1.0 / l)));
47
    }
48
  else
49
    {
50
      double m = j[h] - j[g], n = 0.0, l = 0.0;
51
      if (g > 1)
52
        n = j[g] - j[g - 1];
53
      if (h < i)
54
        l = j[h + 1] - j[h];
55
      if (n > 0.02)
56
        n = 0;
57
      if (m > 0.02)
58
        m = 0;
59
      if (l > 0.02)
60
        l = 0;
61
      if (m < n)
62
        {
63
          double o = m;
64
          m = n;
65
          n = o;
66
        }
67
      if (l < n)
68
        {
69
          double o = l;
70
          l = n;
71
          n = o;
72
        }
73
      if (l < m)
74
        {
75
          double o = l;
76
          l = m;
77
          m = o;
78
        }
79
      if (n != 0.0)
80
        k = (x->b4.d1 == 1
81
             ? ((1 / m) < 25 ? 25 : (1 / m))
82
             : fn3 ((1 / m) < 25 ? 25 : (1 / m)));
83
      else if (m != 0.0)
84
        k = (x->b4.d1 == 1
85
             ? ((2 / (m + l)) < 25 ? 25 : (2 / (m + l)))
86
             : fn3 ((2 / (m + l)) < 25 ? 25 : (2 / (m + l))));
87
      else if (l != 0.0)
88
        k = (x->b4.d1 == 1
89
             ? ((1 / l) < 25 ? 25 : (1 / l))
90
             : fn3 ((1 / l) < 25 ? 25 : (1 / l)));
91
    }
92
  fn5 (e->c2, 0.5 * (x->b2 + x->b3), (x->b4.d1 == 1 ? k : fn4 (k)));
93
  return 1;
94
}

powered by: WebSVN 2.1.0

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