aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.jason/destruct2.C
blob: 62c8f8fba2f6422c7bb5d9e573514779ad51642d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-do assemble  }
// PRMS Id: 4342
// Bug: g++ does not massage things enough to allow calling ~X().

struct X 
{
    virtual ~X ();
};

struct Y : public X
{};

struct Z : public Y, public X	// { dg-warning "" }
{};

void foo ()
{
    Z* f = new Z;
    delete f;			// { dg-bogus "" } 
}