middle-end: Fix stalled swapped condition code value [PR115836]
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / pr94099.c
blob1d7a5d771d6223291452e69bc31a2429fd20ef26
1 /* { dg-additional-options "-O1" } */
3 struct cg {
4 int hk;
5 int *bg;
6 };
8 union vb {
9 struct cg gk;
12 void
13 l3 (union vb *);
15 void
16 pl (void)
18 union vb th = { 0, };
19 int sc;
21 for (sc = 0; sc < 1; ++sc)
23 th.gk.hk = 0;
24 th.gk.bg[sc] = 0; /* { dg-warning "dereference of NULL '0'" } */
25 // TODO: above message could be improved
26 l3 (&th);