gcc/testsuite/gcc.target/sparc/sparc-align-1.c
raw| 1 | /* PR target/31100 */ |
| 2 | /* Reported by Erwin Unruh <[email protected]> */ |
| 3 | |
| 4 | /* { dg-do run } */ |
| 5 | /* { dg-options "-falign-labels=16" } */ |
| 6 | |
| 7 | extern void abort(void); |
| 8 | |
| 9 | int f(int i) |
| 10 | { |
| 11 | int res; |
| 12 | |
| 13 | switch (i) |
| 14 | { |
| 15 | case 5: |
| 16 | res = i - i; |
| 17 | break; |
| 18 | default: |
| 19 | res = i * 2; |
| 20 | break; |
| 21 | } |
| 22 | |
| 23 | return res; |
| 24 | } |
| 25 | |
| 26 | int main(void) |
| 27 | { |
| 28 | if (f(2) != 4) |
| 29 | abort (); |
| 30 | return 0; |
| 31 | } |