Debian Codegraph @

gcc/testsuite/g++.dg/analyzer/pr93950.C

raw
1 // { dg-do compile { target c++11 } }
2
3 struct d
4 {
5 struct e
6 {
7 int f;
8 int *g;
9 };
10 void h (e * i)
11 {
12 void *j = nullptr; // { dg-bogus "NULL" }
13 i->f = *i->g; // { dg-warning "dereference of NULL 'i'" }
14 }
15 virtual void c (int, int)
16 {
17 int *j = nullptr;
18 h (nullptr);
19 }
20 };
21
22 void
23 foo ()
24 {
25 d ();
26 }