Debian Codegraph @

gcc/testsuite/gcc.dg/analyzer/call-summaries-errno.c

raw
1 /* { dg-additional-options "-fanalyzer-call-summaries" } */
2
3 #include <errno.h>
4 #include "analyzer-decls.h"
5
6 void sets_errno (int x)
7 {
8 errno = x;
9 }
10
11 void test_sets_errno (int y)
12 {
13 sets_errno (y);
14 sets_errno (y);
15
16 __analyzer_eval (errno == y); /* { dg-warning "TRUE" } */
17 }