Debian Codegraph @

gcc/testsuite/g++.dg/ubsan/pr68508.C

raw
1 // PR c++/68508
2 // { dg-do compile }
3 // { dg-options "-std=c++14 -fsanitize=vptr" }
4
5 struct A
6 {
7 virtual int foo () { return 0; }
8 };
9
10 const A &
11 bar ()
12 {
13 static A x = A ();
14 return (x);
15 }