[Ada] Handling up-level references in protected entries and freeze nodes
authorGary Dismukes <dismukes@adacore.com>
Thu, 12 Dec 2019 10:02:38 +0000 (10:02 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 12 Dec 2019 10:02:38 +0000 (10:02 +0000)
commit182c8b7d2d43c71c92736bc37fe2a17545aa7776
tree25b8f7441ac3dd6e8750a6c7d59f94f54e400879
parentc171199011ac0d37df67ff99ea7286fa3455efcf
[Ada] Handling up-level references in protected entries and freeze nodes

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

gcc/ada/

* exp_ch9.adb (Build_Protected_Entry): Analyze the block created
to hold the declarations and statements of the protected entry
body right after it's created, and then call Reset_Scopes_To on
that block to reset the Scope of nested entities to the block
scope.
(Reset_Scope): Add handling for N_Freeze_Entity nodes, calling
Reset_Scopes recursively on the Actions of such nodes. Also, for
subprogram bodies that are encountered that might not have a
separate declaration (such as type init procedures), reset the
Scope of the subprogram's entity.

From-SVN: r279289
gcc/ada/ChangeLog
gcc/ada/exp_ch9.adb