From 1d3db14c1e2c8d5cf8ba179897657fd26410879e Mon Sep 17 00:00:00 2001 From: Thomas Quinot Date: Tue, 13 Aug 2013 19:49:21 +0000 Subject: 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 --- gcc/ada/gcc-interface/trans.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gcc/ada/gcc-interface') 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)) -- cgit v1.1