diff options
Diffstat (limited to 'gcc/tree-chkp.c')
-rw-r--r-- | gcc/tree-chkp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-chkp.c b/gcc/tree-chkp.c index 8c1b48cf45c..2489abb2cb0 100644 --- a/gcc/tree-chkp.c +++ b/gcc/tree-chkp.c @@ -1667,8 +1667,9 @@ chkp_find_bound_slots_1 (const_tree type, bitmap have_bound, for (field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field)) if (TREE_CODE (field) == FIELD_DECL) { - HOST_WIDE_INT field_offs - = TREE_INT_CST_LOW (DECL_FIELD_BIT_OFFSET (field)); + HOST_WIDE_INT field_offs = 0; + if (DECL_FIELD_BIT_OFFSET (field)) + field_offs += TREE_INT_CST_LOW (DECL_FIELD_BIT_OFFSET (field)); if (DECL_FIELD_OFFSET (field)) field_offs += TREE_INT_CST_LOW (DECL_FIELD_OFFSET (field)) * 8; chkp_find_bound_slots_1 (TREE_TYPE (field), have_bound, |