summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr46875.c
blob: c601708dc11785b8d293cc20fd4d33d32d43c986 (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
/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
/* { dg-options "-Os -fselective-scheduling2" } */

long
foo (int x, long *y)
{
  long a = 0;
  switch (x)
    {
    case 0:
      a = *y;
      break;
    case 1:
      a = *y;
      break;
    case 2:
      a = *y;
      break;
    case 3:
      a = *y;
      break;
    case 4:
      a = *y;
      break;
    }
  return a;
}