Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
inherit
/
virtual10.C
blob: 4cb858b9293171b0d1b24809989b89cd95a66d1c [
file
] [
log
] [
blame
]
// 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" }
}