diff options
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 3e7b295..8d7000c 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -2180,7 +2180,8 @@ decode_addr_const (exp, value) offset += int_byte_position (TREE_OPERAND (target, 1)); target = TREE_OPERAND (target, 0); } - else if (TREE_CODE (target) == ARRAY_REF) + else if (TREE_CODE (target) == ARRAY_REF + || TREE_CODE (target) == ARRAY_RANGE_REF) { offset += (tree_low_cst (TYPE_SIZE_UNIT (TREE_TYPE (target)), 1) * tree_low_cst (TREE_OPERAND (target, 1), 0)); |