http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58106
Bug ID: 58106 Summary: ICE: in ipa_edge_duplication_hook, at ipa-prop.c:2839 Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: ktkachov at gcc dot gnu.org Created attachment 30625 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30625&action=edit Reduced testcase Given the attached testcase, gcc ICEs with: besttry.c:45:1: internal compiler error: in ipa_edge_duplication_hook, at ipa-prop.c:2839 } ^ 0x61b31b cgraph_call_edge_duplication_hooks(cgraph_edge*, cgraph_edge*) $TOP/gcc/gcc/cgraph.c:438 0xd7f357 clone_inlined_nodes(cgraph_edge*, bool, bool, int*) $TOP/gcc/gcc/ipa-inline-transform.c:178 0xd7e9b8 recursive_inlining $TOP/gcc/gcc/ipa-inline.c:1320 0xd7e9b8 inline_small_functions $TOP/gcc/gcc/ipa-inline.c:1571 0xd7ed3d ipa_inline $TOP/gcc/gcc/ipa-inline.c:1796 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. Bisection shows it started with r200368: 2013-06-24 Martin Jambor <mjam...@suse.cz> PR tree-optimization/57539 * cgraphclones.c (cgraph_clone_node): Add parameter new_inlined_to, set global.inlined_to of the new node to it. All callers changed. * ipa-inline-transform.c (clone_inlined_nodes): New variable inlining_into, pass it to cgraph_clone_node. * ipa-prop.c (ipa_propagate_indirect_call_infos): Do not call ipa_free_edge_args_substructures. (ipa_edge_duplication_hook): Only add edges from inlined nodes to rdesc linked list. Do not assert rdesc edges have inlined caller. Assert we have found an rdesc in the rdesc list. compiled with gcc -O3. Thanks to James Greenhalgh for spotting this. Seems like fallout or an incomplete fix for PR57539