(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
analyzer/
dump-state.c
       1  /* Verify that __analyzer_dump_state works as expected.  */
       2  
       3  #include <stdlib.h>
       4  #include "analyzer-decls.h"
       5  
       6  void test_1 (void)
       7  {
       8    void *p = malloc (1024);
       9    __analyzer_dump_state ("malloc", p); /* { dg-warning "state: 'unchecked'" } */
      10    free (p);
      11    __analyzer_dump_state ("malloc", p); /* { dg-warning "state: 'freed'" } */
      12    __analyzer_dump_state (NULL, p); /* { dg-error "cannot determine state machine" } */
      13    __analyzer_dump_state ("not a state machine", p); /* { dg-error "unrecognized state machine 'not a state machine'" } */
      14  }