repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
re PR sanitizer/89869 (-fsanitize=undefined miscompilation)
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
ubsan
/
vptr-14.C
blob
2247ad99fccff8b28ad080ec3efcfc766a4f061e
1
// PR sanitizer/89869
2
// { dg-do run }
3
// { dg-options "-fsanitize=vptr -fno-sanitize-recover=vptr" }
4
5
struct S { S *s = 0; virtual ~S () {} };
6
7
void
8
foo (S *x, S *y)
9
{
10
(x->s ? y : x) = x->s;
11
}
12
13
int
14
main ()
15
{
16
S a;
17
foo (&a, 0);
18
}