(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
analyzer/
zlib-6a.c
       1  /* { dg-additional-options "-fno-analyzer-suppress-followups" } */
       2  
       3  typedef unsigned char Byte;
       4  typedef unsigned int uInt;
       5  typedef unsigned long uLong;
       6  
       7  typedef struct z_stream_s {
       8    Byte *next_in;
       9    uInt avail_in;
      10    uLong total_in;
      11  } z_stream;
      12  
      13  typedef struct inflate_blocks_state {
      14    uInt bitk;
      15    uLong bitb;
      16    Byte *write;
      17  } inflate_blocks_statef;
      18  
      19  extern int inflate_flush(inflate_blocks_statef *, z_stream *, int);
      20  
      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;
      29  
      30    while (k < (3)) { /* { dg-warning "use of uninitialized value 'k'" } */
      31      {
      32        if (n) /* { dg-warning "use of uninitialized value 'n'" } */
      33          r = 0;
      34        else {
      35          {
      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'" } */
      42          }
      43          return inflate_flush(s, z, r);
      44        }
      45      };
      46      b |= ((uLong)(n--, *p++)) << k; /* { dg-warning "use of uninitialized value" } */
      47      k += 8; /* { dg-warning "use of uninitialized value 'k'" } */
      48    }
      49  }