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 branches/gcc-4_8-branch rev 210799.
[official-gcc.git]
/
gcc-4_8-branch
/
gcc
/
testsuite
/
g++.dg
/
pr60769.C
blob
4c896c69974454ac5d0a4d76dd1eb93418bcf3a7
1
/* { dg-do compile } */
2
/* { dg-options "-O" } */
3
4
template <class T> void fun(T);
5
struct B {};
6
struct R {
7
int *x;
8
B f;
9
};
10
R v(int &, R);
11
void rfun(R &);
12
struct A {
13
void m_fn2(R p1) {
14
R a = p1;
15
rfun(p1);
16
fun(this);
17
fun(a);
18
}
19
};
20
struct J {
21
A ep;
22
A ap;
23
int c2a;
24
void m_fn1(R &p2) {
25
R d, e, b;
26
v(c2a, p2);
27
e = v(c2a, b);
28
ap.m_fn2(e);
29
v(c2a, p2);
30
d = v(c2a, b);
31
ep.m_fn2(d);
32
}
33
};
34
struct N {
35
int &p_;
36
J cfo;
37
};
38
void fn3(N&n) {
39
R h;
40
n.cfo.m_fn1(h);
41
}
42
extern N &c;
43
void fn1() { fn3(c); }