1 // { dg-do assemble  }
2 // GROUPS passed old-abort
3 //
4 // This one creates
5 //
6 // gcc2: Internal compiler error: program cc1plus got fatal signal 11
7 //
8 // when compiled with g++.
9 // The error goes away, if
10 // 1) int ClassInvariant() is not virtual or
11 // 2) GnObject has a virtual destructor or
12 // 3) GnWidget has no virtual destructor or
13 // 4) GnContracts has a virtual destructor
14 //
15 
16 
17 class GnContracts {
18   public:
19     virtual int ClassInvariant();
20 //    virtual ~GnContracts();
21 };
22 
23 class GnObject : public GnContracts {
24   public:
25 //    virtual ~GnObject();
26 };
27 
28 class GnWidget : public GnObject {
29   public:
30     virtual ~GnWidget();
31 };
32 
33 class GnOptionGroup : public GnObject, public GnWidget {// { dg-warning "inaccessible" }
34 };
35 
36