gcc/testsuite/gcc.c-torture/execute/920501-5.c
raw| 1 | /* { dg-require-effective-target label_values } */ |
| 2 | |
| 3 | void abort (void); |
| 4 | void exit (int); |
| 5 | |
| 6 | int |
| 7 | x (int i) |
| 8 | { |
| 9 | void *j[] = {&&x, &&y, &&z}; |
| 10 | goto *j[i]; |
| 11 | x:return 2; |
| 12 | y:return 3; |
| 13 | z:return 5; |
| 14 | |
| 15 | } |
| 16 | int |
| 17 | main (void) |
| 18 | { |
| 19 | if (x (0) != 2 || x (1) != 3 || x (2) != 5) |
| 20 | abort(); |
| 21 | exit(0); |
| 22 | } |