[Ada] Enable debug info generation for Postcondition procedures
Arnaud Charlet
charlet@adacore.com
Mon Jun 14 10:17:00 GMT 2010
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 <dismukes@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Debug_Info_Needed
on the entity of an implicitly generated postcondition procedure.
-------------- next part --------------
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
More information about the Gcc-patches
mailing list