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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [net39.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do run  }
2
void *vp;
3
 
4
class silly {
5
public:
6
  virtual int b() { return 1; }
7
};
8
class solly : silly {
9
public:
10
  virtual int b() { return 2; }
11
};
12
class thing {
13
public:
14
  virtual int a() { return 3; }
15
};
16
class thong : public solly, public thing {
17
public:
18
  virtual int a() {
19
    if (this != vp) return 4;
20
    else return 0;
21
  }
22
};
23
 
24
typedef int(thing::*ping)();
25
ping qq = &thing::a;
26
 
27
int main() {
28
  thong b;
29
  vp = &b;
30
  return (b.*qq)();
31
}

powered by: WebSVN 2.1.0

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