summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/virtual.C
blob: 34c92d8ba8e9b7cd476c58f7d999df7931846fdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// { dg-do assemble  }
// From: chw@bellcore.com (Charlie Woloszynski,MRE 2J-278,8295228,,27143)
// Newsgroups: gnu.g++.bug
// Subject: gcc-2.5.5 bug in multiple inheritance and pure virtual functions
// Date: 25 Jan 1994 23:41:36 -0500

// Bug: g++ fails to notice definitions of abstract virtuals.

class A 
{
public:
  virtual void a1() = 0;
  virtual void a2() = 0;
};

class B
{
public:
  virtual void b1() = 0;
  virtual void b2() = 0;
};


class C: public A, public B
{
public:
  virtual void a2() {}
  virtual void b2() {}
};

class D : public C
{
public:
  virtual void a1() {}
  virtual void b1() {}
};

int main()
{
  D d;				// { dg-bogus "" } 
}