(root)/
gcc-13.2.0/
gcc/
testsuite/
g++.dg/
ubsan/
pr68508.C
// 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);
}