(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
analyzer/
use-after-free-3.c
       1  #include <stdlib.h>
       2  
       3  void test_1 (int x, int y, int *out)
       4  {
       5    int *ptr = (int *)malloc (sizeof (int));
       6    if (!ptr)
       7      return;
       8    *ptr = 19;
       9  
      10    free (ptr);
      11    *out = *ptr; /* { dg-warning "use after 'free' of 'ptr'" } */
      12  }