projects
/
gcc.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
c++: Fix up ubsan false positives on references [PR95693]
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
ubsan
/
pr95693.C
1
// PR sanitizer/95693
2
// { dg-do run }
3
// { dg-options "-O2 -fsanitize=undefined -fno-sanitize-recover=undefined" }
4
5
int g = 9;
6
7
struct A {
8
A () : a(g) {}
9
private:
10
int &a;
11
};
12
13
struct B {
14
A payload;
15
};
16
17
struct C : public B {
18
C () : B () {}
19
A p;
20
};
21
22
int
23
main ()
24
{
25
C t;
26
}