1 /* { dg-additional-options "-Wno-incompatible-pointer-types" } */ 2 3 #include <stdlib.h> 4 5 struct foo; 6 struct bar; hv(struct foo ** tm)7void *hv (struct foo **tm) 8 { 9 void *p = __builtin_malloc (4); 10 *tm = p; 11 if (!p) 12 abort (); 13 return p; /* { dg-warning "leak of 'tm'" } */ 14 } 15 a5(void)16void a5 (void) 17 { 18 struct bar *qb = NULL; 19 hv (&qb); 20 } /* { dg-warning "leak of '\\(struct foo \\*\\)qb'" } */ 21