summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/920501-4.c
blob: 3524dd5c8b2552a9348eee684bc66cfbb6afa983 (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
#ifndef NO_LABEL_VALUES
int
x (int i)
{
  static const void *j[] = {&& x, && y, && z};
  
  goto *j[i];
  
 x: return 2;
 y: return 3;
 z: return 5;
}

int
main (void)
{
  if (   x (0) != 2
      || x (1) != 3
      || x (2) != 5)
    abort ();

  exit (0);
}
#else
int
main (void) { exit (0); }
#endif