Debian Codegraph @

gcc/testsuite/c-c++-common/analyzer/pr104062.c

raw
1 void *
2 calloc (__SIZE_TYPE__, __SIZE_TYPE__);
3
4 void *
5 realloc (void *, __SIZE_TYPE__);
6
7 void
8 foo (void)
9 {
10 int *ap5 = (int *) calloc (4, sizeof *ap5);
11 int *ap7 = (int *) realloc (ap5, sizeof *ap5);
12 } /* { dg-warning "leak of 'ap5'" "leak of ap5" } */
13 /* { dg-warning "leak of 'ap7'" "leak of ap7" { target *-*-* } .-1 } */