gcc/testsuite/gdc.dg/pr110514a.d
raw| 1 | // { dg-do "compile" } |
| 2 | // { dg-options "-O -fdump-tree-optimized" } |
| 3 | immutable uint[] imm_arr = [1,2,3]; |
| 4 | int test_imm(immutable uint[] ptr) |
| 5 | { |
| 6 | return imm_arr[2] == 3 ? 123 : 456; |
| 7 | } |
| 8 | // { dg-final { scan-assembler-not "_d_arraybounds_indexp" } } |
| 9 | // { dg-final { scan-tree-dump "return 123;" optimized } } |