aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr90340.c
blob: 8f3b87c1916f5a75d2e83b694f1b4734dbd465ae (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
31
/* { dg-do compile { target { { x86_64-*-* aarch64-*-* ia64-*-* powerpc64-*-* } && lp64 } } } */
/* { dg-options "-Os -fdump-tree-switchlower1" } */

int a;

int foo(char c) {
  switch (c) {
  case 'c':
    return a;
  case 's':
    return 3;
  case 'n':
    return 1;
  case '%':
    return -2;
  case 'o':
    return a + 2;
    break;
  case 'X':
  case 'x':
    return 2222;
  case 'd':
  case 'i':
  case 'u':
    return 3333;
  default:
    return 0;
  }
}

/* { dg-final { scan-tree-dump ";; GIMPLE switch case clusters: 37 88 JT:99-120" "switchlower1" } } */