aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/vrp108.c
blob: 49dbfb5447b57919873347def6632b1d70562dcc (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
/* { dg-options "-O2 -fdump-tree-vrp1" }  */
/* { dg-final { scan-tree-dump "case 1:" "vrp1" } }  */
/* { dg-final { scan-tree-dump "case 9:" "vrp1" } }  */

extern void foo (void);
extern void bar (void);
extern void baz (void);

void
test (int i)
{
  if (i < 2 || i > 8)
  switch (i)
    {
    case 1:
    case 2: /* Redundant label.  */
      bar ();
      break;
    case 7: /* Redundant label.  */
    case 8: /* Redundant label.  */
    case 9:
      baz ();
      break;
    }
}