aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/analyzer/pr104062.c
blob: 7129c27f60b91435a0f15daa04d77b6800f5fb03 (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 = calloc (4, sizeof *ap5);
  int *ap7 = realloc (ap5, sizeof *ap5);
} /* { dg-warning "leak of 'ap5'" "leak of ap5" } */
/* { dg-warning "leak of 'ap7'" "leak of ap7" { target *-*-* } .-1 } */