aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/analyzer/call-summaries-errno.c
blob: e4333b30bb773ccbdd25514fb6956f22cff2ba81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-additional-options "-fanalyzer-call-summaries" } */

#include <errno.h>
#include "analyzer-decls.h"

void sets_errno (int x)
{
  errno = x;
}

void test_sets_errno (int y)
{
  sets_errno (y);
  sets_errno (y);

  __analyzer_eval (errno == y); /* { dg-warning "TRUE" } */  
}