https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69589
Jan Hubicka <hubicka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org --- Comment #10 from Jan Hubicka <hubicka at gcc dot gnu.org> --- Hello from China and thanks for the analysis, (gdb) p node->debug() _ZN2JS3ubi20PreComputedEdgeRangeD2Ev/73127 (__base_dtor ) @0x7ffff5666e60 Type: function definition analyzed Visibility: prevailing_def_ironly artificial Aux: @0x2a89e30 References: Referring: Read from file: Unified_cpp_js_src35.o Availability: local First run: 0 Function flags: local merged_comdat unlikely_executed Called by: Calls: the node is local and not externally visible.... /* If any symbol in a comdat group is reachable, force all externally visible symbols in the same comdat group to be reachable as well. Comdat-local symbols can be discarded if all uses were inlined. */ if (node->same_comdat_group) { symtab_node *next; for (next = node->same_comdat_group; next != node; next = next->same_comdat_group) if (!next->comdat_local_p () && !reachable.add (next)) enqueue_node (next, &first, &reachable); } This loop explicitly skips comdat_local_p. In general local flag should imply comdat_local_p on comdat symbols. It should be possible to add gcc_assert that the node is never local when enqueue_node is called here. In your second dump the node is still externally visible and !local, so it may be necessary to lookup when it becomes local and why it is not removed afterwards? I think only whole_program_visibility pass brings nodes local, so you may want to breakpoint in the remove_unreachable_nodes call that is done just before ipa-cp. Honza