Sign in
gnu
/
gcc
/
d769c5040874bf9546f2524f3f1d2a894165f92a
/
.
/
gcc
/
testsuite
/
g++.dg
/
ubsan
/
vptr-17.C
blob: b7f6a4cb4dff82fb5997f8a5981578caf0d65c44 [
file
] [
log
] [
blame
]
// PR c++/95466
// { dg-additional-options -fsanitize=vptr }
class
A
{
virtual
void
m_fn1
();
};
class
C
{
public
:
virtual
void
m_fn2
();
};
class
B
:
A
,
public
C
{};
int
main
()
{
B b
;
static_cast
<
C
*>(&
b
)->
m_fn2
();
}