Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / analyzer / zlib-6a.c
blob8c83de4863bc71bc09dd7a3fabe82cc001977aad
1 /* { dg-additional-options "-fno-analyzer-suppress-followups" } */
3 typedef unsigned char Byte;
4 typedef unsigned int uInt;
5 typedef unsigned long uLong;
7 typedef struct z_stream_s {
8 Byte *next_in;
9 uInt avail_in;
10 uLong total_in;
11 } z_stream;
13 typedef struct inflate_blocks_state {
14 uInt bitk;
15 uLong bitb;
16 Byte *write;
17 } inflate_blocks_statef;
19 extern int inflate_flush(inflate_blocks_statef *, z_stream *, int);
21 int inflate_blocks(inflate_blocks_statef *s, z_stream *z, int r) {
22 uInt t;
23 uLong b;
24 uInt k;
25 Byte *p;
26 uInt n;
27 Byte *q;
28 uInt m;
30 while (k < (3)) { /* { dg-warning "use of uninitialized value 'k'" } */
32 if (n) /* { dg-warning "use of uninitialized value 'n'" } */
33 r = 0;
34 else {
36 s->bitb = b; /* { dg-warning "use of uninitialized value 'b'" } */
37 s->bitk = k; /* { dg-warning "use of uninitialized value 'k'" } */
38 z->avail_in = n; /* { dg-warning "use of uninitialized value 'n'" } */
39 z->total_in += p - z->next_in; /* { dg-warning "use of uninitialized value 'p'" } */
40 z->next_in = p; /* { dg-warning "use of uninitialized value 'p'" } */
41 s->write = q; /* { dg-warning "use of uninitialized value 'q'" } */
43 return inflate_flush(s, z, r);
46 b |= ((uLong)(n--, *p++)) << k; /* { dg-warning "use of uninitialized value" } */
47 k += 8; /* { dg-warning "use of uninitialized value 'k'" } */