1 // PR sanitizer/63813 2 // { dg-do compile } 3 // { dg-options "-fsanitize=undefined -O1" } 4 5 struct A {}; 6 struct B { long foo () const; A &bar () const; }; 7 8 A & bar()9 B::bar () const 10 { 11 return *reinterpret_cast <A *> (foo ()); 12 } 13