aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr46107.c
blob: 5c4a8da9daa4e1b48dcf6da260e95e0fbb765d21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* PR tree-optimization/46107 */
/* { dg-require-effective-target indirect_jumps } */
/* { dg-require-effective-target label_values } */

int foo (void) __attribute__ ((noreturn));

void
bar (int x, int *y, int z)
{
  static void *j[] = { &&l1, &&l2 };
l1:
  if (*y)
    goto *j[z];
  foo ();
l2:
  *y ^= (x & 1) ? -1 : 0;
  goto *j[x];
}