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
Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
ipa
/
pr59737.C
blob
cb8a8aa2cdceedae1dd7e4d35700657e0b82720d
1
// PR middle-end/59737
2
// { dg-do compile }
3
// { dg-options "-O2" }
4
5
struct A
6
{
7
virtual void foo (int &x);
8
friend void
9
operator>> (int &x, A &y)
10
{
11
y.foo (x);
12
}
13
};
14
15
struct B : public A
16
{
17
void foo (int &x);
18
};
19
20
struct F : public B
21
{
22
void foo (int &x);
23
};
24
25
struct G : public F
26
{
27
void foo (int &);
28
};
29
30
struct C : A
31
{
32
void foo (int &);
33
struct H : public G
34
{
35
void foo (int &);
36
};
37
struct D : A
38
{
39
H d;
40
};
41
};
42
43
void
44
C::foo (int &x)
45
{
46
D a;
47
x >> a.d;
48
}