aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 18b6487..f144293 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -2281,10 +2281,12 @@ decode_addr_const (exp, value)
while (1)
{
if (TREE_CODE (target) == COMPONENT_REF
- && (TREE_CODE (DECL_FIELD_BITPOS (TREE_OPERAND (target, 1)))
- == INTEGER_CST))
+ && host_integerp (bit_position (TREE_OPERAND (target, 1)), 0))
+
{
- offset += TREE_INT_CST_LOW (DECL_FIELD_BITPOS (TREE_OPERAND (target, 1))) / BITS_PER_UNIT;
+ offset
+ += int_bit_position (TREE_OPERAND (target, 1)) / BITS_PER_UNIT;
+
target = TREE_OPERAND (target, 0);
}
else if (TREE_CODE (target) == ARRAY_REF)