1 #include <stdio.h>
2 
3 struct foo
4 {
5   FILE *m_f;
6 };
7 
test(const char * path)8 void test (const char *path)
9 {
10   struct foo f;
11   f.m_f = fopen (path, "r");
12 
13   if (!f.m_f)
14     return; /* { dg-bogus "leak of FILE" } */
15 
16   fclose (f.m_f);
17   fclose (f.m_f); /* { dg-warning "double 'fclose' of FILE 'f.m_f'" } */
18 }
19