2 // { dg-shouldfail "ubsan" }
3 // { dg-options "-fsanitize=vptr -fno-sanitize-recover=vptr" }
5 extern "C" void abort ();
7 struct S { virtual void f () {} };
8 struct T : S { ~T (); };
10 struct V : T, virtual U {};
28 // { dg-output "\[^\n\r]*vptr-8.C:24:\[0-9]*: runtime error: cast to virtual base of address 0x\[0-9a-fA-F]* which does not point to an object of type 'V'(\n|\r\n|\r)" }
29 // { dg-output "0x\[0-9a-fA-F]*: note: object is of type 'T'(\n|\r\n|\r)" }
30 // { dg-output " ?.. .. .. .. ?.. .. .. .. ?.. .. .. .. \[^\n\r]*(\n|\r\n|\r)" }
31 // { dg-output " ?\\^~~~~~~~~~~\[^\n\r]*(\n|\r\n|\r)" }
32 // { dg-output " ?vptr for 'T'" }