aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr97567-2.c
blob: dee31c6dc013fb53ccbeb09fb563bf8bcc53589f (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
/* { dg-do compile} */
/* { dg-options "-O2 -fdump-tree-evrp" } */

char a[2];

extern int x;

void foo(void);

signed char g (signed char min, signed char max)
{
   signed char i = x;
   return i < min || max < i ? min : i;
}

void gg (void)
{
   signed char t = g (0, 9);
   /* Ranger should be able to remove the call to foo ().  */
   if (t > 9 || t < 0)
     foo ();
}

/* { dg-final { scan-tree-dump-not "foo" "evrp" } }  */