Commit 1d3db14c by Thomas Quinot Committed by Eric Botcazou

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
parent 362db0b2
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.
......
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment