aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/analyzer/pr96646.c
blob: 2ac5a03b0e5d8fca96545051154709e899a007a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* { dg-additional-options "-O1" } */

struct zx {
  struct zx *b4, *g0;
};

struct oo {
  void *ph;
  struct zx el;
};

inline void
k7 (struct zx *xj)
{
  xj->b4->g0 = 0; /* { dg-warning "dereference of NULL" } */
  xj->b4 = 0;
}

void
n8 (struct oo *yx)
{
  k7 (&yx->el);
  n8 (yx);
}