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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [inherit/] [ptrmem2.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 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.