]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* gcc-interface/trans.c (set_end_locus_from_node): Clear column info
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Aug 2013 19:49:21 +0000 (19:49 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Aug 2013 19:49:21 +0000 (19:49 +0000)
for the end_locus of a block if it does not come from an End_Label.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201703 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/gcc-interface/trans.c

index 65481468941b43515f3cd3cdd23f4209010f936a..45fcf886e8998bd3d5e3e416eac9896ac35eb9f6 100644 (file)
@@ -1,3 +1,8 @@
+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
index d2f73561d7c03f41e1c9f08158b142d8aab5c1a6..db55c38eaaed0c9861d60ee6a7ca63b8ca3f3089 100644 (file)
@@ -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))