https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92983
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- Isn't the issue that we say the split function parts are actually the original function? If the tail were artificial there shouldn't be two breakpoints but still a correct inlined subroutine (of an artificial function)? Similar issues exist for clones where the signature doesn't really match reality and which we should represent as artificial functions with an inlined (with constant / optimized away params) copy of the original function. That is, tree_function_versioning sets DECL_ABSTRACT_ORIGIN #0 tree_function_versioning ( old_decl=<function_decl 0x7ffff696e700 nfs3_commit_done>, new_decl=<function_decl 0x7ffff69b5c00 nfs3_commit_done.part.0>, tree_map=0x0, param_adjustments=0x346e090, update_clones=false, blocks_to_copy=0x340a748, new_entry=<basic_block 0x7ffff68175b0 (6)>) at /tmp/trunk2/gcc/tree-inline.c:6130 #1 0x0000000000b48a03 in cgraph_node::create_version_clone_with_body ( this=<cgraph_node * const 0x7ffff696d5a0 "nfs3_commit_done"/5>, redirect_callers=..., tree_map=0x0, param_adjustments=0x346e090, bbs_to_copy=0x340a748, new_entry_block=<basic_block 0x7ffff68175b0 (6)>, suffix=0x2ba39b5 "part", target_attributes=<tree 0x0>) at /tmp/trunk2/gcc/cgraphclones.c:1037 #2 0x00000000021540a7 in split_function ( return_bb=<basic_block 0x7ffff6817618 (7)>, split_point=0x335da40 <best_split_point>, add_tsan_func_exit=false) now, when changing DECL_ABSTRACT_ORIGIN to NULL we later ICE when cloning this node for ISRA because tree_function_versioning does 6122 /* Output the inlining info for this abstract function, since it has been 6123 inlined. If we don't do this now, we can lose the information about the 6124 variables in the function when the blocks get blown away as soon as we 6125 remove the cgraph node. */ 6126 (*debug_hooks->outlining_inline_function) (old_decl); but the old_decl is DECL_ARTIFICIAL and it didn't have early dwarf generated (but what for anyways?). I guess we want the actual outlined BLOCKs to have an abstract origin to the original functions copy? But clearly not the decl itself. I'm hesitant to set DECL_IGNORED_P on it but that avoids the ICEing. The debug info then looks sane though - can you verify? Index: gcc/ipa-split.c =================================================================== --- gcc/ipa-split.c (revision 279944) +++ gcc/ipa-split.c (working copy) @@ -1358,6 +1358,9 @@ split_function (basic_block return_bb, c split_point->split_bbs, split_point->entry_bb, "part"); delete adjustments; node->split_part = true; + /* Do not pretend the tail is a representation of the actual function. */ + DECL_ABSTRACT_ORIGIN (node->decl) = NULL_TREE; + DECL_IGNORED_P (node->decl) = 1; if (cur_node->same_comdat_group) {