diff options
-rw-r--r-- | gcc/ipa-hello-world.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ipa-hello-world.c b/gcc/ipa-hello-world.c index dd8c692286f..813f2759d6b 100644 --- a/gcc/ipa-hello-world.c +++ b/gcc/ipa-hello-world.c @@ -641,6 +641,12 @@ cast_to_void_in_assign(const_tree lhs, const_tree rhs, type_map &escape_map) gcc_assert(base_type_lhs); const_tree base_type_rhs = get_base_type(tree_type_rhs); gcc_assert(base_type_rhs); + // TODO: FIXME: + // Is this always correct? I think this can only happen + // if we are mallocing and friends... + enum tree_code tree_code_base_type_rhs = TREE_CODE(base_type_rhs); + if (tree_code_base_type_rhs == VOID_TYPE) return false; + bool is_casting_stmt = TYPE_MAIN_VARIANT(base_type_lhs) != TYPE_MAIN_VARIANT(base_type_rhs); log("is casting stmt ? %s\n", is_casting_stmt ? "true" : "false"); if (!is_casting_stmt) return false; |