From patchwork Tue Dec 13 13:40:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tristan Gingold X-Patchwork-Id: 131090 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 07AA31007D3 for ; Wed, 14 Dec 2011 00:41:01 +1100 (EST) Received: (qmail 10447 invoked by alias); 13 Dec 2011 13:40:58 -0000 Received: (qmail 10438 invoked by uid 22791); 13 Dec 2011 13:40:57 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Dec 2011 13:40:45 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id A8636CB1738 for ; Tue, 13 Dec 2011 14:40:44 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7yHfHMhv-ucf for ; Tue, 13 Dec 2011 14:40:44 +0100 (CET) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 96C7FCB0E30 for ; Tue, 13 Dec 2011 14:40:44 +0100 (CET) From: Tristan Gingold Subject: [Patch]: Guard the call to begin_epilogue Date: Tue, 13 Dec 2011 14:40:43 +0100 Message-Id: <9C76E78B-829D-4B05-9A01-25A71BA6BBAE@adacore.com> To: GCC Patches Mime-Version: 1.0 (Apple Message framework v1251.1) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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;