aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr97567-2.c
blob: c3ead54eaa8eefa409adfa35e4268267f45720ef (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 -fdisable-tree-ethread" } */

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" } }  */