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
Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git]
/
old-autovect-branch
/
gcc
/
testsuite
/
g++.old-deja
/
g++.mike
/
pmf8.C
blob
10f67c6f00f0b862bf969149115adf4d3581a0b2
1
// { dg-do run }
2
int fail;
3
4
class A *ptr_a;
5
6
class A {
7
public:
8
char space1[24];
9
virtual void foo() {
10
if (this != ptr_a)
11
fail = 1;
12
}
13
};
14
15
class Space {
16
char space2[36];
17
};
18
19
class B : public Space, public A {
20
} b;
21
22
void (B::*pmf1)() = &A::foo;
23
void (A::*pmf2)() = &A::foo;
24
25
int main() {
26
ptr_a = &b;
27
(b .* (void (B::*) ()) &A::foo) ();
28
(b .* pmf1) ();
29
(b .* pmf2) ();
30
(b .* &A::foo) ();
31
return fail;
32
}