aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorThomas Quinot <quinot@adacore.com>2013-08-13 19:49:21 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2013-08-13 19:49:21 +0000
commit1d3db14c1e2c8d5cf8ba179897657fd26410879e (patch)
tree43a65cce72f36264467e8e3db7c924436e8f4481 /gcc
parent362db0b23d017f8c40517507ee453802e5662814 (diff)
downloadgcc-1d3db14c1e2c8d5cf8ba179897657fd26410879e.zip
gcc-1d3db14c1e2c8d5cf8ba179897657fd26410879e.tar.gz
gcc-1d3db14c1e2c8d5cf8ba179897657fd26410879e.tar.bz2
trans.c (set_end_locus_from_node): Clear column info for the end_locus of a block if...
* gcc-interface/trans.c (set_end_locus_from_node): Clear column info for the end_locus of a block if it does not come from an End_Label. From-SVN: r201703
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/gcc-interface/trans.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 6548146..45fcf88 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,10 @@
2013-08-13 Thomas Quinot <quinot@adacore.com>
+ * gcc-interface/trans.c (set_end_locus_from_node): Clear column info
+ for the end_locus of a block if it does not come from an End_Label.
+
+2013-08-13 Thomas Quinot <quinot@adacore.com>
+
* gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
there is no End_Label, attach cleanup actions to the sloc of the HSS
node instead.
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index d2f7356..db55c38 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -9228,9 +9228,13 @@ set_end_locus_from_node (tree gnu_node, Node_Id gnat_node)
gnat_node = Present (gnat_end_label) ? gnat_end_label : gnat_node;
/* Some expanded subprograms have neither an End_Label nor a Sloc
- attached. Notify that to callers. */
+ attached. Notify that to callers. For a block statement with no
+ End_Label, clear column information, so that the tree for a
+ transient block does not receive the sloc of a source condition. */
- if (!Sloc_to_locus (Sloc (gnat_node), &end_locus))
+ if (!Sloc_to_locus1 (Sloc (gnat_node), &end_locus,
+ No (gnat_end_label) &&
+ (Nkind (gnat_node) == N_Block_Statement)))
return false;
switch (TREE_CODE (gnu_node))