http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57539
Martin Jambor <jamborm at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org --- Comment #2 from Martin Jambor <jamborm at gcc dot gnu.org> --- The main reason why the code does not work is that when ipa_edge_duplication_hook is invoked, dst->caller does not yet have its global.inlined_to set (it does not have any callers either) and so we cannot use it to figure out which copy of rdesc in the list is the one describing the new tree of inline clones. This means that this whole copying/re-mapping should be moved out of the hook into a specialized function called from clone_inlined_nodes. Additionally, and this has confused me for hours, we also do not even create the rdesc we want to map a different edge to in this particular testcase. That is because an originally indirect edge is involved and the call to ipa_free_edge_args_substructures in ipa_propagate_indirect_call_infos. That deallocated the vector of jump functions, so the loop over it in the hook did not do anything. That call needs to be removed.