repo.or.cz
/
official-gcc
/
graphite-test-results.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.martin
/
pmf1.C
blob
108754b28df3f4d2b69ff65f1af04681da694d5d
1
// { dg-do run }
2
// Based on a test case by Andrew Bell <andrew.bell@bigfoot.com>
3
// Check for pointer-to-virtual-function calls on
4
// bases without virtual functions.
5
6
struct B{};
7
8
struct D: public B{
9
virtual void foo();
10
};
11
12
void D::foo(){}
13
14
int main()
15
{
16
B *b = new D;
17
void (B::*f)() = static_cast<void (B::*)()>(&D::foo);
18
(b->*f)();
19
}