Deleting restores (before a noreturn) that are dead confuses dwarf2cfi. 2016-06-07 Segher Boessenkool <seg...@kernel.crashing.org>
* dce.c (delete_unmarked_insns): Don't delete instructions with a REG_CFA_RESTORE note. --- gcc/dce.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gcc/dce.c b/gcc/dce.c index ea3fb00..d510287 100644 --- a/gcc/dce.c +++ b/gcc/dce.c @@ -587,6 +587,15 @@ delete_unmarked_insns (void) if (!dbg_cnt (dce)) continue; + if (crtl->shrink_wrapped_separate + && find_reg_note (insn, REG_CFA_RESTORE, NULL)) + { + if (dump_file) + fprintf (dump_file, "DCE: NOT deleting insn %d, it's a " + "callee-save restore\n", INSN_UID (insn)); + continue; + } + if (dump_file) fprintf (dump_file, "DCE: Deleting insn %d\n", INSN_UID (insn)); -- 1.9.3