aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sprint.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-07-30 12:37:41 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-07-30 12:37:41 +0200
commitb6c8e5bee712ecde910e0495e46f5216a7c9a60a (patch)
tree1ef75048cc3c0c738f1de99c7172e436d221568f /gcc/ada/sprint.adb
parent2f6f8285368749fd716178f92e3131d003b6a18c (diff)
downloadgcc-b6c8e5bee712ecde910e0495e46f5216a7c9a60a.zip
gcc-b6c8e5bee712ecde910e0495e46f5216a7c9a60a.tar.gz
gcc-b6c8e5bee712ecde910e0495e46f5216a7c9a60a.tar.bz2
[multiple changes]
2014-07-30 Robert Dewar <dewar@adacore.com> * g-forstr.adb: Minor code reorganization (use J rather than I as a variable name). * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_ch13.adb, g-forstr.ads: Minor reformatting. 2014-07-30 Eric Botcazou <ebotcazou@adacore.com> * sprint.adb (Set_Debug_Sloc): Also reset the end location if we are debugging the generated code. 2014-07-30 Yannick Moy <moy@adacore.com> * sinput.ads, sinput.adb (Comes_From_Inlined_Body): New function that returns True for source pointer for an inlined body. 2014-07-30 Javier Miranda <miranda@adacore.com> * exp_ch4.adb (Apply_Accessibility_Check): Add missing calls to Base_Address(). 2014-07-30 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Hanalyze_Subprogram_Body_Helper): In GNATprove mode, subprogram bodies without a previous declaration are also candidates for front-end inlining. From-SVN: r213242
Diffstat (limited to 'gcc/ada/sprint.adb')
-rw-r--r--gcc/ada/sprint.adb8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb
index 19d3432..98a923a 100644
--- a/gcc/ada/sprint.adb
+++ b/gcc/ada/sprint.adb
@@ -513,6 +513,14 @@ package body Sprint is
begin
if Debug_Generated_Code and then Present (Dump_Node) then
Set_Sloc (Dump_Node, Debug_Sloc + Source_Ptr (Column - 1));
+
+ -- We do not know the actual end location in the generated code and
+ -- it could be much closer than in the source code, so play safe.
+
+ if Nkind_In (Dump_Node, N_Case_Statement, N_If_Statement) then
+ Set_End_Location (Dump_Node, Debug_Sloc + Source_Ptr (Column - 1));
+ end if;
+
Dump_Node := Empty;
end if;
end Set_Debug_Sloc;