gcc/testsuite/gcc.c-torture/compile/labels-3.c
raw| 1 | /* Verify that we can narrow the storage associated with label diffs. */ |
| 2 | /* { dg-require-effective-target indirect_jumps } */ |
| 3 | /* { dg-require-effective-target label_values } */ |
| 4 | |
| 5 | int foo (int a) |
| 6 | { |
| 7 | static const short ar[] = { &&l1 - &&l1, &&l2 - &&l1 }; |
| 8 | void *p = &&l1 + ar[a]; |
| 9 | goto *p; |
| 10 | l1: |
| 11 | return 1; |
| 12 | l2: |
| 13 | return 2; |
| 14 | } |