(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
analyzer/
symbolic-6.c
       1  #include "analyzer-decls.h"
       2  
       3  int a[1024];
       4  int b[1024];
       5  
       6  extern void escape (void *ptr);
       7  
       8  void test_1 (int *p)
       9  {
      10    int c, d;
      11    escape (&c);
      12  
      13    *p = 42;
      14    __analyzer_eval (*p == 42); /* { dg-warning "TRUE" } */
      15  
      16    /* These writes shouldn't affect *p.  */
      17    c = 33;
      18    d = 44;
      19    __analyzer_eval (*p == 42); /* { dg-warning "TRUE" } */
      20  
      21    /* This write could affect *p.  */
      22    a[16] = 55;
      23    __analyzer_eval (*p == 42); /* { dg-warning "UNKNOWN" } */
      24  }