summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/vrp40.c
blob: 23f080acfe4f02007f54829a2b0950c99e98bf60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-vrp1" } */

int f(int a) {
    switch (a & 1) {
      case 0:
      case 1: return  3;
      case 2: return  5;
      case 3: return  7;
      case 4: return 11;
      case 5: return 13;
      case 6: return 17;
      case 7: return 19;
    }
}

/* { dg-final { scan-tree-dump "return 3;" "vrp1" } } */
/* { dg-final { cleanup-tree-dump "vrp1" } } */