aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/analyzer/leak-2.c
blob: bba3e816db76bfd3c3fa6c3db2730e7a9c15e180 (plain)
1
2
3
4
5
6
7
8
9
#include <stdlib.h>

void *ptr;

void *test (void)
{
  ptr = malloc (1024);
  ptr = NULL; /* { dg-warning "leak of 'ptr'" } */
}