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

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

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do run  }
2
// prms-id: 4736
3
 
4
int did_fail = 1;
5
 
6
class O {
7
public:
8
  virtual void of() { }
9
};
10
 
11
class A : public O {
12
public:
13
  virtual void vf() { }
14
};
15
 
16
class W {
17
public:
18
  virtual void vf() { }
19
};
20
 
21
class X : public W, public A {
22
public:
23
  virtual void vf() { }
24
};
25
 
26
class Z : public X {
27
public:
28
  virtual void vf() { did_fail = 0; }
29
};
30
 
31
Z sz;
32
 
33
void fail1(W* w) {
34
  w->vf();
35
}
36
 
37
int main() {
38
  fail1 (&sz);
39
  return did_fail;
40
}

powered by: WebSVN 2.1.0

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