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
2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
other
/
virtual3.C
blob
55c81855714ad72954d99cf724a2d01e3fcbe907
1
// PR c++/58923
2
3
struct A
4
{
5
virtual void do_it() const = 0;
6
};
7
8
struct B : A
9
{
10
virtual void do_it() const {}
11
};
12
13
struct C
14
{
15
operator B() const { return B(); }
16
};
17
18
void do_it(const A& a) { a.do_it(); }
19
20
int main()
21
{
22
C c;
23
do_it(c);
24
return 0;
25
}