1 // PR sanitizer/89869 2 // { dg-do run } 3 // { dg-options "-fsanitize=vptr -fno-sanitize-recover=vptr" } 4 ~SS5 struct S { S *s = 0; virtual ~S () {} }; 6 7 void foo(S * x,S * y)8 foo (S *x, S *y) 9 { 10 (x->s ? y : x) = x->s; 11 } 12 13 int main()14 main () 15 { 16 S a; 17 foo (&a, 0); 18 } 19