Debian Codegraph @

compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base-construction.cpp

raw
1 // RUN: %clangxx -frtti -fsanitize=vptr -fno-sanitize-recover=vptr %s -o %t
2 // RUN: %run %t
3
4 // REQUIRES: cxxabi
5 // FIXME: Should pass on Android, but started failing around 2023-11-05 for unknown reasons.
6 // UNSUPPORTED: target={{.*(windows-msvc|android).*}}
7
8 int volatile n;
9
10 struct A { virtual ~A() {} };
11 struct B: virtual A {};
12 struct C: virtual A { ~C() { n = 0; } };
13 struct D: virtual B, virtual C {};
14
15 int main() { delete new D; }