diff options
author | Erick Ochoa <erick.ochoa@theobroma-systems.com> | 2020-12-10 09:45:19 +0100 |
---|---|---|
committer | Erick Ochoa <erick.ochoa@theobroma-systems.com> | 2020-12-10 09:45:55 +0100 |
commit | 8d7890ef92b1d188e7c0eaeea8c31076a86753da (patch) | |
tree | 2db4ff29b457da80e1c920242b0bea655e873259 | |
parent | 60bae7965a6353736767fe6073e910a7082b91bd (diff) |
semantics
-rw-r--r-- | gcc/ipa-dfe.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/ipa-dfe.c b/gcc/ipa-dfe.c index 98427e8e423..a6945b8e9bc 100644 --- a/gcc/ipa-dfe.c +++ b/gcc/ipa-dfe.c @@ -678,8 +678,10 @@ type_reconstructor::_walk_field_post (tree t) tree record = for_reference2.last (); field_offsets2_t **field_offsets_ptr = _records2.get(record); - if (!field_offsets_ptr) return; - field_offsets2_t *field_offsets = *field_offsets_ptr; + field_offsets2_t *field_offsets = field_offsets_ptr ? *field_offsets_ptr : new field_offsets2_t; + if (!field_offsets_ptr) { + _records2.put(record, field_offsets); + } // What's the field offset? unsigned f_byte_offset = tree_to_uhwi (DECL_FIELD_OFFSET (t)); unsigned f_bit_offset = tree_to_uhwi (DECL_FIELD_BIT_OFFSET (t)); |