Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.jason/destruct3.C

raw
1 // { dg-do assemble }
2 // { dg-options "-w" }
3 // PRMS Id: 4342 (second testcase)
4 // Bug: g++ still can't deal with ambiguous inheritance in destructor calls.
5
6 struct ccUnwind
7 {
8 ccUnwind ();
9 virtual ~ccUnwind ();
10 };
11
12 struct ccPersistent
13 {
14 virtual void bar();
15 };
16
17 struct ccImpExp : public ccPersistent, public ccUnwind
18 {};
19
20 struct ccTool : public ccImpExp
21 {};
22
23 struct ccScreenTool : public ccTool
24 {};
25
26 struct ccVTool : public ccScreenTool
27 {};
28
29 struct ccScreenObjRep : public ccUnwind
30 {};
31
32 struct ccScreenObj : public ccScreenObjRep
33 {};
34
35 struct ccVSTool : public ccImpExp, public ccUnwind
36 {};
37
38 struct ccSCCP : public ccVSTool
39 {};
40
41 void foo ()
42 {
43 ccSCCP* foo = new ccSCCP;
44 delete foo;
45 }