OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [inherit/] [ptrmem2.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/16810
2
 
3
struct C {
4
  virtual void f() {}
5
};
6
 
7
struct B {virtual ~B() {} };
8
 
9
class D : public B, public C
10
{
11
public:
12
  virtual void f() {}
13
};
14
 
15
typedef void ( C::*FP)();
16
typedef void ( D::*D_f)();
17
 
18
int main() {
19
  D *d = new D();
20
  C *c = d;
21
 
22
  const FP fptr = (FP) &D::f;;
23
  (d->* (D_f)fptr)();
24
}
25
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.