summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/gcc.dg/20050105-1.c
blob: 58a75150bdb1a637ff4b49a4a04ea210111e317a (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
/* PR rtl-optimization/18861 */
/* { dg-do compile } */
/* { dg-options "-O2" } */

extern void abort (void);

int
foo (int code)
{
  if (code >= 3)
    switch (code)
      {
      case 3: return 4;
      case 4: return 3;
      case 5: return 6;
      case 6: return 7;
      case 7: return 8;
      case 8: return 5;
      default: abort ();
      }
  switch (code)
    {
    case 3: return 4;
    case 4: return 3;
    case 5: return 6;
    case 6: return 7;
    case 7: return 8;
    case 8: return 5;
    default: abort ();
    }
}
OpenPOWER on IntegriCloud