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
+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
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))));