Sign in
gnu
/
gcc
/
d769c5040874bf9546f2524f3f1d2a894165f92a
/
.
/
gcc
/
testsuite
/
g++.dg
/
rtti
/
no-rtti.C
blob: a8bd78e0f39d3a87d1e8c66b6c8abba00b101999 [
file
] [
log
] [
blame
]
// { dg-do compile }
// { dg-options "-fno-rtti" }
// PR C++/10891
struct
A
{
virtual
~
A
()
{
}
};
struct
B
:
A
{
};
A
*
f
();
int
main
()
{
B
*
b
=
dynamic_cast
<
B
*>(
f
());
// { dg-error "11:.dynamic_cast. not permitted" }
}