aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr49994-3.c
blob: 72930932f8d30b0098d8a6f7cd0649f1d559e4e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* { dg-do compile } */
/* { dg-options "-O2 -fsched2-use-superblocks -g -w" } */
/* { dg-options "-O2 -fsched2-use-superblocks -g -mbackchain" { target s390*-*-* } } */
/* { dg-require-effective-target scheduling } */

void *
foo (int offset)
{
  switch (offset)
    {
    case 0:
      return __builtin_return_address (0);
    case 1:
      return __builtin_return_address (1);
    case 2:
      return __builtin_return_address (2);
    case 3:
      return __builtin_return_address (3);
    case 4:
      return __builtin_return_address (4);
    }
  return 0;
}