aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ubsan/vptr-13.C
blob: 345581fd9d0efc25ef5249c75d1d88c1554c07c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// PR c++/87095
// { dg-do run }
// { dg-options "-fsanitize=vptr -fno-sanitize-recover=vptr" }

struct A
{
  virtual ~A () {}
};

struct B : virtual A {};

struct C : B {};

int
main ()
{
  C c;
  return 0;
}