Sign in
gnu
/
gcc
/
1f16a020acbea0af26209478990b83b1a1ba3a2b
/
.
/
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" }
}