IRA: Ignore debug insns for uses in split_live_ranges_for_shrink_wrap. [PR116179]
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / analyzer-verbosity-2a.c
blobcf014b0a3c8fa01b04f2e9e062bd7c3711eeeb6d
1 /* { dg-additional-options "-fanalyzer-verbosity=2" } */
3 typedef struct FILE FILE;
5 FILE* fopen (const char*, const char*);
6 int fclose (FILE*);
8 extern int foo ();
9 extern void bar ();
11 void test (const char *path, int flag)
13 FILE *fp = fopen (path, "r"); /* { dg-message "opened here" } */
15 /* We shouldn't report this control flow at -fanalyzer-verbosity=2. */
16 if (foo ()) /* { dg-bogus "" } */
17 bar ();
18 else
19 bar ();
21 if (flag) /* { dg-message "when 'flag == 0'" } */
22 fclose (fp);
23 } /* { dg-warning "leak of FILE 'fp'" } */