From patchwork Mon Jun 14 10:10:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Charlet X-Patchwork-Id: 55510 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 DBA44B7D8C for ; Mon, 14 Jun 2010 20:10:49 +1000 (EST) Received: (qmail 24709 invoked by alias); 14 Jun 2010 10:10:46 -0000 Received: (qmail 24695 invoked by uid 22791); 14 Jun 2010 10:10:44 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Jun 2010 10:10:40 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id D4F8CCB02C0; Mon, 14 Jun 2010 12:10:43 +0200 (CEST) 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 QxxU0GITlzRo; Mon, 14 Jun 2010 12:10:43 +0200 (CEST) Received: from saumur.act-europe.fr (saumur.act-europe.fr [10.10.0.183]) by mel.act-europe.fr (Postfix) with ESMTP id BF457CB02BF; Mon, 14 Jun 2010 12:10:43 +0200 (CEST) Received: by saumur.act-europe.fr (Postfix, from userid 525) id B9217D9B31; Mon, 14 Jun 2010 12:10:50 +0200 (CEST) Date: Mon, 14 Jun 2010 12:10:50 +0200 From: Arnaud Charlet To: gcc-patches@gcc.gnu.org Cc: Gary Dismukes Subject: [Ada] Enable debug info generation for Postcondition procedures Message-ID: <20100614101050.GA13577@adacore.com> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.9i 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 Implicitly generated postcondition procedures are now marked as requiring debug info, for improved support for decision coverage analysis. No simple test available. Tested on x86_64-pc-linux-gnu, committed on trunk 2010-06-14 Gary Dismukes * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Debug_Info_Needed on the entity of an implicitly generated postcondition procedure. Index: sem_ch6.adb =================================================================== --- sem_ch6.adb (revision 160713) +++ sem_ch6.adb (working copy) @@ -2030,10 +2030,13 @@ end if; end if; - -- Mark presence of postcondition proc in current scope + -- Mark presence of postcondition procedure in current scope and mark + -- the procedure itself as needing debug info. The latter is important + -- when analyzing decision coverage (for example, for MC/DC coverage). if Chars (Body_Id) = Name_uPostconditions then Set_Has_Postconditions (Current_Scope); + Set_Debug_Info_Needed (Body_Id); end if; -- Place subprogram on scope stack, and make formals visible. If there