1 /* { dg-additional-options "-Wno-incompatible-pointer-types" } */
2 
3 #include <stdlib.h>
4 
5 struct foo;
6 struct bar;
hv(struct foo ** tm)7 void *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)16 void a5 (void)
17 {
18   struct bar *qb = NULL;
19   hv (&qb);
20 } /* { dg-warning "leak of '\\(struct foo \\*\\)qb'" } */
21