1  /* { dg-additional-options "-fanalyzer-verbosity=1" } */
       2  
       3  #include <stdlib.h>
       4  
       5  void
       6  calls_free (void *victim)
       7  {
       8    free (victim); /* { dg-warning "double-'free' of 'victim'" } */
       9  }
      10  
      11  extern void do_stuff (void);
      12  
      13  struct foo
      14  {
      15    void *m_p;
      16  };
      17  
      18  void test (struct foo f)
      19  {
      20    do_stuff ();
      21  
      22    calls_free (f.m_p);
      23  
      24    do_stuff ();
      25  
      26    calls_free (f.m_p); /* { dg-message "passing freed pointer 'f\\.m_p' in call to 'calls_free' from 'test'" } */
      27  
      28    do_stuff ();
      29  }