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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [inline20.C] - Blame information for rev 749

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

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
2
 
3
struct A {
4
  int a, b, c, d;
5
};
6
 
7
inline void foo (int, A &);
8
 
9
struct D {
10
};
11
 
12
struct E: public D {
13
  void f (A &y)
14
  {
15
    foo (1, y);
16
  }
17
};
18
 
19
struct F: public D {
20
  void f (A &y)
21
  {
22
    foo (2, y);
23
  }
24
};
25
 
26
E *d;
27
F *e;
28
 
29
inline int baz (int y)
30
{
31
  A a;
32
  if (y) {
33
    d->f (a);
34
  } else {
35
    e->f (a);
36
  }
37
  return 0;
38
}
39
 
40
inline void foo (int y, A &z)
41
{
42
  z.a = baz (y);
43
  z.b = baz (y);
44
  z.c = baz (y);
45
  z.d = baz (y);
46
}
47
 
48
struct G {
49
  E a;
50
  F b;
51
  void bar (A &);
52
};
53
 
54
void G::bar(A &y)
55
{
56
  a.f(y);
57
  b.f(y);
58
}

powered by: WebSVN 2.1.0

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