2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / const4.C
blobd29c46b74255cb3bc49d8460fcef8eaac801e445
1 // { dg-do assemble  }
2 // PRMS Id: 8927
3 // Bug: complex inheritance interferes with const checking
5 class GrandParent {
6 public:
7   virtual void DoIt();
8 protected:
9   int A;
12 class Parent : virtual public GrandParent {
13 public:
14   virtual void DoX() const;
17 class Child : public Parent {
18 public:
19   void DoX() const;
22 void Child::DoX() const
24   A = 10;               // { dg-error "" } assignment to const