aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/analyzer/pr104062.c
blob: 9b44893dd4ba4cc0c59163e0564d24c63161af3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
void *
calloc (__SIZE_TYPE__, __SIZE_TYPE__);

void *
realloc (void *, __SIZE_TYPE__);

void
foo (void)
{
  int *ap5 = (int *) calloc (4, sizeof *ap5);
  int *ap7 = (int *) realloc (ap5, sizeof *ap5);
} /* { dg-warning "leak of 'ap5'" "leak of ap5" } */
/* { dg-warning "leak of 'ap7'" "leak of ap7" { target *-*-* } .-1 } */