1  /* PR tree-optimization/18046  */
       2  /* { dg-options "-O2 -fdump-tree-switchlower" }  */
       3  /* We scan for 2 switches as the dump file reports a transformation,
       4     IL really contains just a single.  */
       5  /* { dg-final { scan-tree-dump-times "switch \\(" 2 "switchlower1" } }  */
       6  
       7  void foo (void);
       8  void bar (void);
       9  void baz (void);
      10  
      11  void
      12  test (int i)
      13  {
      14    switch (i)
      15      {
      16      case 1:
      17        foo ();
      18        break;
      19      case 2:
      20        bar ();
      21        break;
      22      default:
      23        break;
      24      }
      25  
      26    /* This switch should be gone after threading/VRP.  */
      27    switch (i)
      28      {
      29      case 1:
      30        foo ();
      31        break;
      32      case 2:
      33        baz ();
      34        break;
      35      default:
      36        break;
      37      }
      38  }