summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr57438-2.c
blob: f3ff1dc1ed208e02df0ee23ea351abffbe765687 (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 { target *-*-darwin* } } */
/* { dg-options "--param case-values-threshold=3 -O2" } */
/* { dg-additional-options "-funwind-tables" { target powerpc*-*-darwin* } }

/* This is testing that a trailing local label is followed by a
   nop where required.  */
   
int foo (int x)
{
  switch (x)
    {
      case 0:
        return 10;
      case 3:
        return -1;
      case 5:
        return 29;
      default:
        __builtin_unreachable();
    }
}

/* { dg-final { scan-assembler "nop\\nLFE.*" { target  { *-*-darwin* } } } } */