gcc/testsuite/gcc.dg/pr46440.c
raw| 1 | /* PR rtl-optimization/46440 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-O -fstack-protector -fno-tree-dominator-opts -fno-tree-fre" } */ |
| 4 | /* { dg-require-effective-target fstack_protector } */ |
| 5 | |
| 6 | int i; |
| 7 | |
| 8 | void bar (char *); |
| 9 | |
| 10 | void |
| 11 | foo (void) |
| 12 | { |
| 13 | void *l; |
| 14 | char c[64]; |
| 15 | bar (c); |
| 16 | i = 1; |
| 17 | if (i) |
| 18 | l = &&l1; |
| 19 | else |
| 20 | l = &&l2; |
| 21 | goto *l; |
| 22 | l2: |
| 23 | __builtin_abort (); |
| 24 | l1:; |
| 25 | } |