From patchwork Mon Jun 14 10:10:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Ada] Enable debug info generation for Postcondition procedures Date: Mon, 14 Jun 2010 00:10:50 -0000 From: Arnaud Charlet X-Patchwork-Id: 55510 Message-Id: <20100614101050.GA13577@adacore.com> To: gcc-patches@gcc.gnu.org Cc: Gary Dismukes 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