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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do run  }
2
// prms-id: 3068
3
 
4
extern "C" int printf(const char *, ...);
5
extern "C" void exit(int);
6
 
7
class LB {
8
public:
9
  virtual int test() { return 0; }
10
  virtual ~LB() { }
11
protected:
12
  LB() { }
13
};
14
 
15
class RRB {
16
public:
17
  virtual ~RRB() { }
18
  virtual void test2(int a) { }
19
};
20
 
21
class RR : public RRB {
22
public:
23
    virtual ~RR() { }
24
};
25
 
26
class RL {
27
public:
28
  virtual void real(int a) {
29
    printf("RL::real\n");
30
  }
31
};
32
 
33
 
34
class R : public RL, public RR {
35
public:
36
  virtual void test3(int a) { }
37
  virtual void test2(int a) { }
38
};
39
 
40
class L : public LB {
41
};
42
 
43
class C : public L, public R {
44
public:
45
  C() { }
46
  virtual ~C() {
47
    printf("C::~C\n");
48
    exit(1);
49
  }
50
  virtual void real(int a) {
51
    printf("RL::real\n");
52
  }
53
};
54
 
55
int main() {
56
    C& bb = *new C;
57
    R& mv = bb;
58
    bb.real(0);
59
    mv.real(0);
60
    return 0;
61
}

powered by: WebSVN 2.1.0

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