aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/inherit/virtual10.C
blob: 4cb858b9293171b0d1b24809989b89cd95a66d1c (plain)
1
2
3
4
5
6
7
8
9
10
11
// PR c++/14263

struct A { };

struct B : virtual A { };

int main()
{
   A* p = new B;
   B* q = static_cast<B*>(p);  // { dg-error "cannot convert from pointer to base class 'A' to pointer to derived class 'B' because the base is virtual" }
}