1  /* PR tree-optimization/71520 */
       2  /* { dg-do compile } */
       3  /* { dg-options "-O2 -fdump-tree-optimized" } */
       4  
       5  void bar (int);
       6  
       7  void
       8  foo (int x)
       9  {
      10    switch (x)
      11      {
      12      case 1:
      13      case 12:
      14      case 28:
      15      case 174:
      16        bar (1);
      17        bar (2);
      18        break;
      19      case 3:
      20      case 7:
      21      case 78:
      22      case 96:
      23      case 121:
      24      default:
      25        bar (3);
      26        bar (4);
      27        bar (5);
      28        bar (6);
      29        break;
      30      case 8:
      31      case 13:
      32      case 27:
      33      case 19:
      34      case 118:
      35        bar (3);
      36        bar (4);
      37        bar (5);
      38        bar (6);
      39        break;
      40      case 4:
      41        bar (7);
      42        break;
      43      }
      44  }
      45  
      46  void
      47  baz (int x)
      48  {
      49    switch (x)
      50      {
      51      case 1:
      52      case 12:
      53      case 28:
      54      case 174:
      55        bar (8);
      56        bar (9);
      57        break;
      58      case 3:
      59      case 7:
      60      case 78:
      61      case 96:
      62      case 121:
      63      default:
      64      lab1:
      65      lab2:
      66        bar (10);
      67        bar (11);
      68        bar (12);
      69        bar (13);
      70        break;
      71      case 8:
      72      case 13:
      73      case 27:
      74      case 19:
      75      case 118:
      76      lab3:
      77      lab4:
      78        bar (10);
      79        bar (11);
      80        bar (12);
      81        bar (13);
      82        break;
      83      case 4:
      84        bar (14);
      85        break;
      86      }
      87  }
      88  
      89  /* { dg-final { scan-tree-dump-times "bar \\\(3\\\);" 1 "optimized" } } */
      90  /* { dg-final { scan-tree-dump-times "bar \\\(10\\\);" 1 "optimized" } } */