aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/destruct3.C
blob: 3dc287c7489577e465c796002a9b90423500f6e7 (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
42
43
44
45
// { dg-do assemble  }
// { dg-options "-w" }
// PRMS Id: 4342 (second testcase)
// Bug: g++ still can't deal with ambiguous inheritance in destructor calls.

struct ccUnwind 
{
    ccUnwind ();
    virtual ~ccUnwind ();
};

struct ccPersistent
{
    virtual void bar();
};

struct ccImpExp : public ccPersistent, public ccUnwind
{};

struct ccTool : public ccImpExp
{};

struct ccScreenTool : public ccTool
{};

struct ccVTool : public ccScreenTool
{};

struct ccScreenObjRep : public ccUnwind
{};

struct ccScreenObj : public ccScreenObjRep
{};

struct ccVSTool : public ccImpExp, public ccUnwind 
{};

struct ccSCCP : public ccVSTool
{};

void foo ()
{
    ccSCCP* foo = new ccSCCP;
    delete foo;
}