https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65087

--- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> ---
So the problem is caused by ICF which makes a symbol to have no direct calls
(and no references). As a result IPA CP triggers verification failure. I hope
the right solution is to append TODO_remove_function for ICF IPA pass.

I've been testing following patch:

diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
index 31fcbec..56f59a9 100644
--- a/gcc/ipa-icf.c
+++ b/gcc/ipa-icf.c
@@ -3049,7 +3049,7 @@ const pass_data pass_data_ipa_icf =
   0,                        /* properties_provided */
   0,                        /* properties_destroyed */
   0,                        /* todo_flags_start */
-  0,                        /* todo_flags_finish */
+  TODO_remove_functions,    /* todo_flags_finish */
 };

 class pass_ipa_icf : public ipa_opt_pass_d

Martin

Reply via email to