aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/analyzer/casts-2.c
blob: 3eef71726ba397c86eeef714b1ad95810537cf93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "analyzer-decls.h"

void test_1 (int i)
{
  char c1 = i;
  char c2 = i;
  __analyzer_eval (c1 == i); /* { dg-warning "UNKNOWN" } */  
  __analyzer_eval (c1 == c2); /* { dg-warning "TRUE" } */  
}

void test_2 (char c)
{
  int i = c;
  __analyzer_eval (i == c); /* { dg-warning "TRUE" } */  
}