aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr84436-2.c
blob: c34027a08b9245eeb58cfb25f66b48be566c5108 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/* PR tree-optimization/84436 */
/* { dg-options "-O2 -fdump-tree-switchconv -fdump-tree-optimized" } */

char
lowerit(char a)
{
  switch (a)
    {
    default:
      return a;
    case 'A':
      return 'a';
    case 'B':
      return 'b';
    case 'C':
      return 'c';
    case 'D':
      return 'd';
    case 'E':
      return 'e';
    case 'F':
      return 'f';
    case 'G':
      return 'g';
    case 'H':
      return 'h';
    case 'I':
      return 'i';
    case 'J':
      return 'j';
    case 'K':
      return 'k';
    case 'L':
      return 'l';
    case 'M':
      return 'm';
    case 'N':
      return 'n';
    case 'O':
      return 'o';
    case 'P':
      return 'p';
    case 'Q':
      return 'q';
    case 'R':
      return 'r';
    case 'S':
      return 's';
    case 'T':
      return 't';
    case 'U':
      return 'u';
    case 'V':
      return 'v';
    case 'W':
      return 'w';
    case 'X':
      return 'x';
    case 'Y':
      return 'y';
    case 'Z':
      return 'z';
    }
}

/* { dg-final { scan-tree-dump-times "a_.*\\+ 32" 1 "switchconv" } } */
/* { dg-final { scan-tree-dump-not "switch" "optimized" } } */