From patchwork Tue Dec 13 13:40:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: : Guard the call to begin_epilogue Date: Tue, 13 Dec 2011 03:40:43 -0000 From: Tristan Gingold X-Patchwork-Id: 131090 Message-Id: <9C76E78B-829D-4B05-9A01-25A71BA6BBAE@adacore.com> To: GCC Patches Hi, currently, the call to begin_epilogue debug hook in final_scan_insn is unconditional and therefore occurs even when DECL_IGNORED_P is true. This is not what is done for other debug hooks, and leads to ICE on VMS (the only platform that defines the hook) as last_filename is NULL. Tested on alpha64-dec-openvms, committed to trunk as obvious. Tristan. 2011-12-13 Tristan Gingold * final.c (final_scan_insn): Guard the call to begin_epilogue debug hook. Index: final.c =================================================================== --- final.c (revision 182280) +++ final.c (working copy) @@ -1973,7 +1973,8 @@ break; case NOTE_INSN_EPILOGUE_BEG: - (*debug_hooks->begin_epilogue) (last_linenum, last_filename); + if (!DECL_IGNORED_P (current_function_decl)) + (*debug_hooks->begin_epilogue) (last_linenum, last_filename); targetm.asm_out.function_begin_epilogue (file); break;