gnu_label_addr_mixed_goto.c (314B)
1 /* Mix named goto (to `done`) with computed gotos (to address-taken `a`/`b`). 2 * tab[1]->b: x=10, tab[0]->a: x=11, then named goto done -> 11. */ 3 int test_main(void) { 4 static void* const tab[] = {&&a, &&b}; 5 int x = 0; 6 goto* tab[1]; 7 a: 8 x += 1; 9 goto done; 10 b: 11 x += 10; 12 goto* tab[0]; 13 done: 14 return x; 15 }