repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
ubsan
/
pr95693.C
blob
13f688e8ec0c6f6ba78a89d9bbb2ccee7993898e
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
}