From 1d3db14c1e2c8d5cf8ba179897657fd26410879e Mon Sep 17 00:00:00 2001 From: Thomas Quinot Date: Tue, 13 Aug 2013 19:49:21 +0000 Subject: [PATCH] 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/ChangeLog | 5 +++++ gcc/ada/gcc-interface/trans.c | 8 ++++++-- 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 + * 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 + * 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)) -- 2.7.4