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
* doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.mike
/
pmf9.C
blob
17e58b4d7aa0d1065f7a6df1421182d8a93049e1
1
// { dg-do run }
2
class K {
3
public:
4
int f(int i) { return i; }
5
};
6
7
class Q {
8
public:
9
Q() { kp = new K; }
10
int g();
11
private:
12
K * kp;
13
};
14
15
int Q::g() {
16
return (kp->f)(42);
17
}
18
19
20
int main () {
21
Q q;
22
if (q.g() != 42)
23
return 1;
24
}