(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
analyzer/
malloc-ipa-6.c
       1  #include <stdlib.h>
       2  
       3  void *
       4  calls_malloc (void)
       5  {
       6    void *result = malloc (1024); /* { dg-message "allocated here" } */
       7    return result; /* { dg-warning "leak of 'result'" } */
       8  }
       9  
      10  void test_1 ()
      11  {
      12    calls_malloc (); /* { dg-message "calling 'calls_malloc' from 'test_1'" } */
      13  }
      14  
      15  static void callee (int i)
      16  {
      17  }
      18  
      19  void test_2 (int i)
      20  {
      21    callee (i);
      22  }