Commit ca00cd02 by Gary Dismukes Committed by Pierre-Marie de Rodat

[Ada] Fix related to handling up-level references in protected entries

2019-12-12  Gary Dismukes  <dismukes@adacore.com>

gcc/ada/

	* exp_ch9.adb (Build_Protected_Entry): Set the Scope of the new
	block to be the entity of the procedure created for the entry.

From-SVN: r279300
parent fbb076f4
2019-12-12 Gary Dismukes <dismukes@adacore.com>
* exp_ch9.adb (Build_Protected_Entry): Set the Scope of the new
block to be the entity of the procedure created for the entry.
2019-12-12 Steve Baird <baird@adacore.com>
* sem_ch10.adb (Install_With_Clause): Check for the case of a
......
......@@ -3724,10 +3724,13 @@ package body Exp_Ch9 is
Handled_Statement_Sequence => Handled_Statement_Sequence (N)));
-- Analyze now and reset scopes for declarations so that Scope fields
-- currently denoting the entry will now denote the block scope.
-- currently denoting the entry will now denote the block scope, and
-- the block's scope will be set to the new procedure entity.
Analyze_Statements (Bod_Stmts);
Set_Scope (Entity (Identifier (First (Bod_Stmts))), Bod_Id);
Reset_Scopes_To
(First (Bod_Stmts), Entity (Identifier (First (Bod_Stmts))));
......
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