23 Jul 2012 10:12
[Ada] Fix to SCOs for SELECT alternatives with guard
Arnaud Charlet <charlet <at> adacore.com>
2012-07-23 08:12:50 GMT
2012-07-23 08:12:50 GMT
This change fixes incorrect source location indications in SCOs for decisions corresponding to guard expressions in SELECT statements, which can cause a crash in coverage analysis tools. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-07-23 Thomas Quinot <quinot <at> adacore.com> * par_sco.adb (Process_Decisions.Output_Header): For the guard on an alternative in a SELECT statement, use the First_Sloc of the guard expression (not its topmost sloc) as the decision location, because this is what is referenced by dominance markers.
Index: par_sco.adb
===================================================================
--- par_sco.adb (revision 189768)
+++ par_sco.adb (working copy)
<at> <at> -25,6 +25,7 <at> <at>
with Atree; use Atree;
with Debug; use Debug;
+with Errout; use Errout;
with Lib; use Lib;
with Lib.Util; use Lib.Util;
with Namet; use Namet;
<at> <at> -495,13 +496,15 <at> <at>
-- levels (through the pragma argument association) to get to
-- the pragma node itself. For the guard on a select
(Continue reading)
RSS Feed