diff options
author | Marc Poulhiès <poulhies@adacore.com> | 2024-08-08 13:36:37 +0200 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2024-09-02 10:22:49 +0200 |
commit | cb690aa1ce37f109986a5848c2b727be6a2aaacb (patch) | |
tree | 10e6514f8abf2bc6da1c34a819bed2d95df60dbd /libgcc | |
parent | 905ab329ccd06b0154eb42724eb5999165cd01fc (diff) | |
download | gcc-cb690aa1ce37f109986a5848c2b727be6a2aaacb.zip gcc-cb690aa1ce37f109986a5848c2b727be6a2aaacb.tar.gz gcc-cb690aa1ce37f109986a5848c2b727be6a2aaacb.tar.bz2 |
ada: Also reset scope for some nested declaration
When changing the scope for entities found in the entry body that is
mutated into a procedure, the compiler needs to look deeper than only
the top level entities as expansion may produce object declarations
which scopes are also the entry. For example, the tree after expansion
may look like:
procedure This_Is_An_Entry_Proc is
...
O1 : Typ := do
TMP1 : OTyp := ...;
...
in TMP1;
O1's scope needs to be reset to This_Is_An_Entry_Proc, but so does
TMP1's scope.
This change also fix a small oversight where
N_Implicit_Label_Declaration scope must be reset and its content
skipped.
gcc/ada/
* exp_ch9.adb (Reset_Scopes_To): Adjust comment.
(Reset_Scopes_To.Reset_Scope): Adjust the scope reset for object
declaration. In particular, visit the children nodes if any. Also
extend the handling of other declarations to
N_Implicit_Label_Declaration.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions