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/] [20040609-1.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* PRs target/15569, rtl-optimization/15681 */
2
/* { dg-do compile } */
3
/* { dg-options "-Os -frename-registers" } */
4
/* { dg-options "-mconstant-gp -Os -frename-registers" { target ia64-*-* } } */
5
 
6
struct S { struct S *a, *b; };
7
struct T { struct S e; unsigned long a; int b, c; void *d; } f;
8
 
9
unsigned long f1 (unsigned long);
10
void f2 (int, struct T *);
11
void *f3 (void *);
12
unsigned long volatile g;
13
 
14
static void
15
f4 (struct T *p)
16
{
17
  f1 (f1 (((unsigned long) g - p->a) >> 20));
18
}
19
 
20
static struct T *
21
f5 (void)
22
{
23
  struct T *g, *p;
24
  struct T *q = 0;
25
  for (g = p = &f; (g = p = (struct T *) (g->e.a)) != &f;)
26
    if (p->b)
27
      {
28
        f4 (p);
29
        if (p->c & 0x80000)
30
          return p;
31
      }
32
  return q;
33
}
34
 
35
static void
36
f6 (struct T *p)
37
{
38
  f2 (9, p);
39
}
40
 
41
static inline void *
42
f7 (struct T *t)
43
{
44
  void *d;
45
  d = t->d;
46
  if (d)
47
    d = f3 (d);
48
  return d;
49
}
50
 
51
static void *
52
f8 (struct T *p)
53
{
54
  void *d = f7 (p);
55
  if (!d)
56
    return 0;
57
  f6 (p);
58
  return d;
59
}
60
 
61
static void
62
f9 (void)
63
{
64
  struct T *p;
65
  p = f5 ();
66
  f8 (p);
67
}
68
 
69
void
70
test (void)
71
{
72
  f9 ();
73
}

powered by: WebSVN 2.1.0

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