repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge reload-branch up to revision 101000
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.other
/
inline20.C
blob
0e94291fb0ead69ca18a75be7eb30489334639d7
1
// { 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
}