summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/vrp44.c
blob: a2df852c7bf4f38c4a2198a68c74d4deded0ead9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* { dg-do link } */
/* { dg-options "-O2" } */

extern void link_error (void);

void test1(int i)
{
  if (i >= -5 && i <= 8)
    {
      unsigned int j = i + 1;
      if (j == -5)
	link_error ();
      if (j == 10)
	link_error ();
    }
}

void test2(unsigned int i)
{
  if (i >= -5 || i <= 8)
    {
      int j = i;
      if (j == -6)
	link_error ();
      if (j == 9)
	link_error ();
    }
}

int main() { return 0; }