Debian Codegraph @

gcc/testsuite/c-c++-common/analyzer/unused-local-1.c

raw
1 /* { dg-additional-options "-fdump-analyzer-untracked" } */
2
3 struct st
4 {
5 const char *m_filename;
6 int m_line;
7 const char *m_function;
8 };
9
10 extern void debug (struct st *);
11
12 void test (void)
13 {
14 {
15 static struct st s1 = { __FILE__, __LINE__, __func__ }; /* { dg-warning "track 's1': no" } */
16 debug (&s1);
17 }
18 {
19 static struct st s2 = { __FILE__, __LINE__, __func__ }; /* { dg-warning "track 's2': no" } */
20 debug (&s2);
21 }
22 }