diff options
Diffstat (limited to 'gcc/type-reconstructor.c')
-rw-r--r-- | gcc/type-reconstructor.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/type-reconstructor.c b/gcc/type-reconstructor.c index bcde1890638..f39dec94484 100644 --- a/gcc/type-reconstructor.c +++ b/gcc/type-reconstructor.c @@ -76,7 +76,17 @@ TypeReconstructor::get_is_modified(const_tree t) gcc_assert(in_map); bool retval = modified_map[t]; modified_map.erase(t); - return retval; + + bool points_to_record = false; + tree tt = (tree)t; + while (TREE_TYPE(tt)) + { + tt = TREE_TYPE(tt); + } + points_to_record = TREE_CODE(tt) == RECORD_TYPE; + + + return retval && points_to_record; } bool @@ -162,7 +172,7 @@ TypeReconstructor::_walk_ARRAY_TYPE_post(const_tree t) } TypeStringifier stringifier; //std::string name = stringifier.stringify(copy); - log("are we going to crash is modified %s %s\n", is_modified ? "t" : "f", TypeStringifier::get_type_identifier(t)); + log("are we going to crash is modified %s %s\n", is_modified ? "t" : "f", TypeStringifier::get_type_identifier(copy).c_str()); if (is_modified) layout_type(copy); _reorg_map[t] = is_modified ? copy : (tree)t; |