1  #include <stdlib.h>
       2  
       3  void *ptr;
       4  
       5  void *test (void)
       6  {
       7    ptr = malloc (1024);
       8    ptr = NULL; /* { dg-warning "leak of 'ptr'" } */
       9  }
       1  #include <stdlib.h>
       2  
       3  void *ptr;
       4  
       5  void *test (void)
       6  {
       7    ptr = malloc (1024);
       8    ptr = NULL; /* { dg-warning "leak of 'ptr'" } */
       9  }