summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/sparc/sparc-align-1.c
blob: 14c915e1e12458c976aa2683c8cbd7bd35f62422 (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 target/31100 */
/* Reported by Erwin Unruh <Erwin.Unruh@fujitsu-siemens.com> */

/* { dg-do run } */
/* { dg-options "-falign-labels=16" } */

extern void abort(void);

int f(int i)
{
  int res;

  switch (i)
    {
    case 5:
      res = i - i;
      break;
    default:
      res = i * 2;
      break;
    }

  return res;
}

int main(void)
{
  if (f(2) != 4)
    abort ();
  return 0;
}