Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
ubsan
/
pr68508.C
blob: ffe8f0071dbc5a41c7e75863b735722696fc9d8a [
file
] [
log
] [
blame
]
// PR c++/68508
// { dg-do compile }
// { dg-options "-std=c++14 -fsanitize=vptr" }
struct
A
{
virtual
int
foo
()
{
return
0
;
}
};
const
A
&
bar
()
{
static
A x
=
A
();
return
(
x
);
}