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
/
opt
/
ptrmem7.C
blob
7d9e9b17d3d3b86276af51c4f22773576d77ecb2
1
// PR c++/70615
2
// { dg-options -O }
3
4
struct C
5
{
6
virtual void f () {}
7
};
8
9
struct B
10
{
11
virtual ~B () {}
12
};
13
14
class D : public B, public C
15
{
16
public:
17
D () {}
18
};
19
20
typedef void (C::*FP) ();
21
typedef void (D::*D_f) ();
22
23
int
24
main ()
25
{
26
D *d = new D ();
27
C *c = d;
28
const FP fptr = (FP) & D::f;
29
(d->*(D_f) fptr) ();
30
return 0;
31
}