diff options
author | Erick Ochoa <erick.ochoa@theobroma-systems.com> | 2020-03-10 11:39:20 +0100 |
---|---|---|
committer | Erick Ochoa <erick.ochoa@theobroma-systems.com> | 2020-04-28 23:35:49 +0200 |
commit | 088b053bd77492d1ff29d9a68ffb53fcf0f65f26 (patch) | |
tree | e379317418b13c4cdcd74093d97af6130d3d61df | |
parent | 205fa31d7e52e2be3686b3dce704e2da5871f1d0 (diff) |
Dealing with malloc and friends
-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; |