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/] [p10148.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do run  }
2
// { dg-options "" }
3
// prms-id: 10148
4
 
5
int fail = 1;
6
void ok() { fail = 0; }
7
 
8
class TC {
9
  int s_;
10
};
11
 
12
class TIRD {
13
 public:
14
  void (*itc)();
15
  TIRD() { itc = ok; }
16
};
17
 
18
class TCCB : public TC, public TIRD {
19
};
20
 
21
class TCRCB : public TCCB {
22
public:
23
  virtual void eat ();
24
};
25
 
26
void TCRCB::eat () {
27
 void *vp = (void *)((TIRD*)this)->itc;
28
 this->itc();
29
}
30
 
31
int main() {
32
  TCRCB a;
33
  a.eat();
34
  return fail;
35
}

powered by: WebSVN 2.1.0

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