aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr49994-3.c
blob: 11e8fe5ade57bd8fdf0f310945cceb7a5eee2e97 (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
/* { dg-do compile } */
/* { dg-options "-O2 -fsched2-use-superblocks -g" } */
/* { dg-options "-O2 -fsched2-use-superblocks -g -mbackchain" { target s390*-*-* } } */
/* { dg-require-effective-target scheduling } */
/* { dg-skip-if "PR testsuite/50722" { ia64-*-*-* hppa*-*-* *-*-hpux* } } */

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;
}