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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [pr42662.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* PR debug/42662 */
2
/* { dg-do compile } */
3
/* { dg-options "-g -O2" } */
4
 
5
struct S { unsigned long s[17]; };
6
 
7
static inline void
8
foo (struct S *r, struct S *a, unsigned n)
9
{
10
  unsigned b = n / 8;
11
  r->s[0] = (b >= 1 ? : a->s[1 - b]);
12
}
13
 
14
static inline void
15
bar (struct S *r, struct S *a)
16
{
17
  r->s[0] = a->s[0] << 1;
18
}
19
 
20
static inline void
21
baz (struct S *r, struct S *a, struct S *b)
22
{
23
  unsigned c = 0;
24
  int i;
25
  for (i = 0; i < 3; ++i)
26
    {
27
      unsigned long d = a->s[i];
28
      long e = d + b->s[i];
29
      if (c)
30
        ++e == 0;
31
      c = e < d;
32
      r->s[i] = e;
33
    }
34
}
35
 
36
void
37
test (struct S *r, int s, int d)
38
{
39
  struct S u;
40
  if (s)
41
    {
42
      bar (&u, r);
43
      foo (r, r, 3);
44
      baz (r, r, &u);
45
    }
46
  u.s[0] = d;
47
  baz (r, r, &u);
48
}

powered by: WebSVN 2.1.0

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