2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.brendan / crash17.C
blobdd7a7b9e0cd3f6c725ea71fb23f9359273c00d74
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
17 class GnContracts {
18   public:
19     virtual int ClassInvariant();
20 //    virtual ~GnContracts();
23 class GnObject : public GnContracts {
24   public:
25 //    virtual ~GnObject();
28 class GnWidget : public GnObject {
29   public:
30     virtual ~GnWidget();
33 class GnOptionGroup : public GnObject, public GnWidget {// { dg-error "" }  warning