Sign in
gnu
/
gcc
/
d769c5040874bf9546f2524f3f1d2a894165f92a
/
.
/
gcc
/
testsuite
/
g++.dg
/
ubsan
/
pr63813.C
blob: 6ca5b2d18c9abeee1610176219196cc66e4749e5 [
file
] [
log
] [
blame
]
// PR sanitizer/63813
// { dg-do compile }
// { dg-options "-fsanitize=undefined -O1" }
struct
A
{};
struct
B
{
long
foo
()
const
;
A
&
bar
()
const
;
};
A
&
B
::
bar
()
const
{
return
*
reinterpret_cast
<
A
*>
(
foo
());
}