summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/inherit/virtual1.C
blob: 08bcbb143cfb0a0557f4286587d1ec7f40599bcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//PR c++/27952

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

struct B : A, virtual A {};     // { dg-error "duplicate base|forward declaration" }

struct C : A, B {};             // { dg-error "duplicate base|invalid use" }

C c;                            // { dg-error "aggregate" }