aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/analyzer/pr96639.c
blob: aedf0464dc937d6b90f6aba04b865fc6b0fae0c9 (plain)
1
2
3
4
5
6
7
8
9
10
void *calloc (__SIZE_TYPE__, __SIZE_TYPE__);

int
x7 (void)
{
  int **md = calloc (1, sizeof (void *));

  return md[0][0]; /* { dg-warning "possibly-NULL" "unchecked deref" } */
  /* { dg-warning "leak of 'md'" "leak" { target *-*-* } .-1 } */
}